Browse code

added transition-data and table

Christian Fraß authored on27/11/2016 17:30:26
Showing26 changed files
... ...
@@ -9,15 +9,18 @@
9 9
 				"name": "structure",
10 10
 				"type": "php",
11 11
 				"parameters": {
12
+					"only_last": true,
12 13
 					"inputs": [
13
-						"source/content/draft.html.php",
14
-						"source/data/phonology_and_orthography.json",
15
-						"source/data/personal_pronouns.json",
16
-						"source/data/word_functions.json",
17
-						"source/data/timeforms.json",
18 14
 						"source/data/adpositions.json",
15
+						"source/data/common.json",
19 16
 						"source/data/correlatives.json",
20 17
 						"source/data/declension.json",
18
+						"source/data/personal_pronouns.json",
19
+						"source/data/phonology_and_orthography.json",
20
+						"source/data/texts.json",
21
+						"source/data/timeforms.json",
22
+						"source/data/transitions.json",
23
+						"source/data/word_functions.json",
21 24
 						"source/logic/server/misc.php",
22 25
 						"source/logic/server/data.php",
23 26
 						"source/logic/server/settings.php",
... ...
@@ -52,10 +55,10 @@
52 55
 						"source/content/dictionary.html.php",
53 56
 						"source/content/examples.html.php",
54 57
 						"source/content/example_sentences.html.php",
55
-						"source/content/example_texts.html.php"
58
+						"source/content/example_texts.html.php",
59
+						"source/content/draft.html.php"
56 60
 					],
57
-					"output": "build/draft.html",
58
-					"only_first": true
61
+					"output": "build/draft.html"
59 62
 				}
60 63
 			},
61 64
 			{
... ...
@@ -26,9 +26,9 @@
26 26
 			$data = sql_rename($data, "name", "type_name");
27 27
 		}
28 28
 		{
29
-			$data = sql_cross($data, $data_adpositions["kinds"]);
30
-			$data = sql_select($data, function ($row) {return ($row["kind_id"] == $row["id"]);});
31
-			$data = sql_delete($data, ["kind_id", "id"]);
29
+			$data = sql_cross($data, $data_adpositions["references"]);
30
+			$data = sql_select($data, function ($row) {return ($row["reference_id"] == $row["id"]);});
31
+			$data = sql_delete($data, ["reference_id", "id"]);
32 32
 			$data = sql_rename($data, "name", "kind_name");
33 33
 		}
34 34
 	}
... ...
@@ -44,7 +44,7 @@
44 44
 		],
45 45
 		$data
46 46
 	);
47
-	$table = $table->snap
47
+	$table_ = $table->snap
48 48
 	(
49 49
 		[
50 50
 			"label_vertical" => function ($column) {return "";},
... ...
@@ -67,22 +67,17 @@
67 67
 			{
68 68
 				return $values;
69 69
 			},
70
-			"data_formatter" => function ($value)
71
-			{
72
-				return (
73
-					_bar("word")
74
-					(
75
-						[
76
-							"original" => $value[0]["words"],
77
-							"translated" => $value[1]["words"],
78
-						]
79
-					)
80
-				);
81
-				return json_encode($value);
82
-			},
70
+			"data_formatter" => function_chain
71
+			(
72
+				[
73
+					object_from_array("language_id"),
74
+					object_map(object_attribute("words")),
75
+					format_correlation("type_word"),
76
+				]
77
+			),
83 78
 		]
84 79
 	);
85
-	$table->generate();
80
+	$table_->generate();
86 81
  ?>
87 82
 </section>
88 83
 
... ...
@@ -2,6 +2,6 @@
2 2
 	<header>Cases</header>
3 3
 	<?php proposal(); ?>
4 4
 	<p>The base form of noun is the <span class="grammarterm">nominative</span>
5
-	<p>Regular nouns can appear in two cases: <span class="grammarterm">nominative</span> and <span class="grammarterm">genitive</span>. The nominative doesn't receive any marker while the genitive is formed by appending the suffix <span class="word lang_fs">-(e)s</span> to the word, e.g. <span class="word lang_fs">huses</span> ~ <span class="word lang_en">houses</span>. The marker for the plural has to be applied first, e.g. <span class="word lang_fs">huser(e)s</span> ~ <span class="word lang_en">the houses'</span>.</p>
5
+	<p>Regular nouns can appear in two cases: <span class="grammarterm">nominative</span> and <span class="grammarterm">genitive</span>. The nominative doesn't receive any marker while the genitive is formed by appending the suffix <?php echo(mark("-(e)s", ["type_word", "lang_fs"])); ?> to the word, e.g. <?php echo(format_correlation("type_word")(["fs" => ["huses"], "en" => ["houses"]])); ?>. The marker for the plural has to be applied first, e.g. <?php echo(format_correlation("type_word")(["fs" => ["huser(e)s"], "en" => ["houses'"]])); ?>.</p>
6 6
 </section>
7 7
 
... ...
@@ -35,7 +35,7 @@
35 35
 		],
36 36
 		$data
37 37
 	);
38
-	$table = $table->snap
38
+	$table_ = $table->snap
39 39
 	(
40 40
 		[
41 41
 			"label_vertical" => function ($column) {return "";},
... ...
@@ -50,32 +50,28 @@
50 50
 			],
51 51
 			"columns_data" =>
52 52
 			[
53
+				$table->columns_get()[0],
53 54
 				$table->columns_get()[3],
54 55
 			],
55 56
 			"data_aggregator" => function ($values)
56 57
 			{
57 58
 				return $values;
58 59
 			},
59
-			"data_formatter" => function ($value)
60
-			{
61
-				return (
62
-					_bar("word")
63
-					(
64
-						[
65
-							"original" => $value[0]["words"],
66
-							"translated" => $value[1]["words"],
67
-						]
68
-					)
69
-				);
70
-				return json_encode($value);
71
-			},
60
+			"data_formatter" => function_chain
61
+			(
62
+				[
63
+					object_from_array("language_id"),
64
+					object_map(object_attribute("words")),
65
+					format_correlation("type_word"),
66
+				]
67
+			),
72 68
 		]
73 69
 	);
74
-	$table->generate();
70
+	$table_->generate();
75 71
  ?>
76 72
 	<div class="note note_information">
77 73
 		<span class="note_content">
78
-			<p>Some of these words are very unlikely to ever get used (e.g. <span class="word lang_fs">ni slag</span>). Nevertheless they exist and are listed for completeness.</p>
74
+			<p>Some of these words are very unlikely to ever get used (e.g. <?php echo(mark("ni slag", ["type_word", "lang_fs"])); ?>). Nevertheless they exist and are listed for completeness.</p>
79 75
 		</span>
80 76
 	</div>
81 77
 </section>
... ...
@@ -99,8 +99,8 @@
99 99
 				{
100 100
 					case 0:
101 101
 					{
102
-						return _baz($value[0]["words"], "word", "fs");
103
-						// break;
102
+						return format_list("type_word", "fs")($value[0]["words"]);
103
+						break;
104 104
 					}
105 105
 					case 1:
106 106
 					{
... ...
@@ -120,26 +120,25 @@
120 120
 							);
121 121
 						}
122 122
 						return (
123
-							_bar("word")
123
+							format_correlation("type_word")
124 124
 							(
125 125
 								[
126
-									"original" => $value_["fs"],
127
-									"translated" => $value_[$configuration["target"]],
126
+									"fs" => $value_["fs"],
127
+									$configuration["target"] => $value_[$configuration["target"]],
128 128
 								]
129 129
 							)
130 130
 						);
131
-						// break;
131
+						break;
132 132
 					}
133 133
 					default:
134 134
 					{
135 135
 						return json_encode($value);
136
-						// break;
136
+						break;
137 137
 					}
138 138
 				}
139 139
 			},
140 140
 		]
141 141
 	)->generate();
142
-?>
143
-<p><span class="sentence lang_fs">Vi kön see de huses vindöger.</span> ~ <span class="sentence lang_en">We can see the houses' windows.</span></p>
144
-</section>
142
+ ?>
143
+<p><?php echo(format_correlation("type_sentence")(["fs" => ["Vi kön see de huses vindöger"], "en" => ["We can see the houses windows."]])); ?></p></section>
145 144
 
... ...
@@ -1,7 +1,7 @@
1 1
 <section class="subsection" id="definiteness">
2 2
 	<header>Definiteness</header>
3 3
 	<?php proposal(); ?>
4
-	<p>The undefinite aspect of a singular noun is formed by using the article <span class="word lang_fs">en</span>, e.g. <span class="word lang_fs">en hus</span> ~ <span class="word lang_en">a house</span>. Undefinite plural nouns don't have an article, e.g. <span class="word lang_fs">huser</span> ~ <span class="word lang_en">houses</span>.</p>
5
-	<p>The definite aspect of both singular and plural nouns is formed by using the article <span class="word lang_fs">de</span>, e.g. <span class="word lang_fs">de hus</span> ~ <span class="word lang_en">the house</span>.</p>
4
+	<p>The undefinite aspect of a singular noun is formed by using the article <?php echo(mark("en", ["type_word", "lang_fs"])); ?>, e.g. <?php echo(format_correlation("type_word")(["fs" => ["en hus"], "en" => ["a house"]])); ?>. Undefinite plural nouns don't have an article, e.g. <?php echo(format_correlation("type_word")(["fs" => ["huser"], "en" => ["houses"]])); ?>.</p>
5
+	<p>The definite aspect of both singular and plural nouns is formed by using the article <?php echo(mark("de", ["type_word", "lang_fs"])); ?>, e.g. <?php echo(format_correlation("type_word")(["fs" => ["de hus"], "en" => ["the house"]])); ?>.</p>
6 6
 </section>
7 7
 
... ...
@@ -21,6 +21,20 @@
21 21
 			titlepage
22 22
 			  -->
23 23
 <?php
24
+	/*
25
+	echo
26
+	(
27
+		function_chain
28
+		(
29
+			[
30
+				function ($x) {return $x+1;},
31
+				function ($x) {return $x*2;},
32
+				function ($x) {return $x/3;},
33
+			]
34
+		)
35
+		(5)
36
+	);
37
+	 */
24 38
 	compose
25 39
 	(
26 40
 		[
... ...
@@ -31,6 +45,8 @@
31 45
 			"examples",
32 46
 		]
33 47
 	);
48
+	/*
49
+	 */
34 50
  ?>
35 51
 		</div>
36 52
 	</body>
... ...
@@ -1,16 +1,24 @@
1
+<?php
2
+	$data = read_json("source/data/texts.json");
3
+ ?>
1 4
 <section class="section" id="example_texts">
2 5
 	<header>Texts</header>
3
-	<section class="subsection" id="de_grot_diktator">
4
-		<header>De grot diktator</header>
5
-		<span class="text lang_fs">
6
-			<p>Ek bid fur fargivung, dok ek vil nit are de verlds herskar — ek ar nit solk en man. Ek vil nit beherske odar neddruyke et man, insted ek vil helpe de maner alvan and alvar: De judisk, de hejdisk, de fargig, de vit, …. Vi al skal helpe en de ander fur at vi koyn leve ine en beter verld. Vi vil nit hate odar farakte us. Dis verld hav plats fur al maner and ur erd ar so rik, at vi al koyn spise nok. De levrid koyn are so fri and skoyn; dok vi hav farlatet de veg.</p>
7
-			<p>Gridhed hav suykent de maners seler and hav fuylt de verld med hatrid; hit hav ledet us to elend and blutsketrid. Vi hav utvikelt raskhed, dok ur gester stan stil. Vi lat makiner verke fur us; ur vetrid hav makt us hokmudig and ur klughed hard and unfrendlik; vi denk altu mang and foyl altu lit. Dok mer den makiner vi treng manlikhed; mer den klughed vi treng frendlikhed and gudhed. An dis egenheder, ur levrid ar fruykridig and al ding ar lost.</p>
8
-			<p>Med de helprid av fluygtuyger and de radio vi ar narer en to de ander den et tid ruk. De manskap treng enhed and en alvar arend bruderlikhed fur tu bruke dis utfindunger gud. Selv no mang tused in der verld koyn hoyre min stem, mang tusend fartvivelt verer, kviner and smal kinder — ofarunger av en sistem, vilk fang and kvel unskuldig maner. Ek rup to al, vilk koyn hoyr mek no: Fartvivel nit! De elend skal farsvinde, van de gridhed farsvind and de biterhed av maner, vilk fruyk de manskaps forskritrid. De Maners hatrid skal farsvinde and diktarorer skal doye. Dan de kraft, vilk di hav takt fra de folk, skal kome bak to de folk. Selv ef mang blud ar sketet: Tu kempe fur de frihed ar en gud sak.</p>
9
-			<p>Kemparer: Kemp nit fur tiraner; maner, vilk farakt ju and mak ju to sklaver; vilk vertskat nit jer levrid, vilk seg to ju, vat je skal make, true and foyle! Di skend ju, foyd ju, behandel ju lik kanon-foydung. Kemp nit fur dis fardervt maner — makin-maner med makin-hoyvder and makin-herter! Je ar nit makiner, je ar nit direr, je ar maner. Lat de manlikhed blive ine jer herter! Je skal nit hate; bar de unlivt hat, de unlivt and de fardervt.</p>
10
-			<p>Kemperar: Kemp nit fur de sklavskap! Kemp fur de frihed! Ine de 17. avsniding av de hajlig Lukas ar skrivt: ‚God ar ine al maner.‘ — nit bar ine en grup av maner, insted ine al maner, ine ju. Je, de folk, hav de kraft; de kraft fur tu bue vapener, dok ok de kraft fur tu sprede gladhed. Je, de folk, hav de kraft fur tu make dis levrid fri and skoyn, fur tu make dis levrid en vunderfuylt sak. Darfur: Ine de nam av folkherskrid: Lat us bruke dis kraft! Lat us verde en! Lat us kempe fur en nuy verld, fur en beter verld, vilk giv to de maner magrid tu verke, vilk giv en eftertid to de jung and sikerhed to de eld. Ok de tiraner hav truent dis to us fur tu foe de vold, dok di hav luygt. Di mak nit sant dir luvung, di vil ni tid. Tiraner frien bar dim selv, dok de folk skal blive sklaver.</p>
11
-			<p>Lat us no kempe fur tu upfuyle dis luvung. Lat us kempe fur tu make de verld fri, fur tu uvervinde landmarker, gridhed, hatrid and de untillatrid. Lat us kempe fur en verld med farstanrid, en verld, var vetridskap and forskritrid skal lede to al mans gladhed.</p>
12
-			<p>Kemparer: Ine de nam av folkherskrid: Lat us al verde en!</p>
13
-		</span>
6
+<?php
7
+	$id = "de_grot_diktator";
8
+	$dataset = $data[$id];
9
+ ?>
10
+	<section class="subsection" id="<?php echo($id); ?>">
11
+		<header><?php echo($dataset["title"]); ?></header>
12
+<?php
13
+	echo
14
+	(
15
+		mark
16
+		(
17
+			implode("", array_map(function ($paragraph) {return ("<p>${paragraph}</p>");}, $dataset["paragraphs"])),
18
+			["type_text", "lang_fs"]
19
+		)
20
+	);
21
+ ?>
14 22
 		<p>An attempt to translate the final speech from the famous Charlie Chaplin movie "The great dictator" (with some passages inspired by the German translation); the English original can be listened to <a href="https://www.youtube.com/watch?v=ibVpDhW6kDQ">on youtube</a>; or in case you'd like to hear a more heart-wrenching version: <a href="https://www.youtube.com/watch?v=Gaq62VCcnew">accompanied by "Hans Zimmer - Time"</a>.</p>
15 23
 		<!--
16 24
 		<a href="https://www.youtube.com/watch?v=Gaq62VCcnew">With "Hans Zimmer -- Time"</a>
... ...
@@ -1,8 +1,8 @@
1 1
 <section class="subsection" id="infinite_verbforms">
2 2
 	<header>Infinite Verbforms</header>
3
-	<p>The <span class="grammarterm">infinitive</span> is formed by appending <span class="word lang_fs">-e</span> to the verb stem, e.g. <span class="word lang_fs">skrive</span> ~ <span class="word lang_en">to write</span>. In some cases it is mandatory to mark the infinitive with the special particle <span class="word lang_fs">tu</span> in order to form the <span class="grammarterm">extended intfinitive</span>, e.g.: <span class="sentence lang_fs">Han hop tu finde en svart sten.</span> ~ <span class="sentence lang_en">He hopes to find a black stone.</span>.</p>
3
+	<p>The <span class="grammarterm">infinitive</span> is formed by appending <?php echo(mark("-e", ["type_word", "lang_fs"])); ?> to the verb stem, e.g. <?php echo(format_correlation("type_word")(["fs" => ["skrive"], "en" => ["to write"]])); ?>. In some cases it is mandatory to mark the infinitive with the special particle <?php echo(mark("tu", ["type_word", "lang_fs"])); ?> in order to form the <span class="grammarterm">extended intfinitive</span>, e.g.: <?php echo(format_correlation("type_sentence")(["fs" => ["Han hup tu finde en svart sten."], "en" => ["He hopes to find a black stone."]])); ?>.</p>
4 4
 	<span class="todo">Specify cases for extended infinitive</span>
5
-	<p>The <span class="grammarterm">active participle</span> is formed by appending <span class="word lang_fs">-end</span> to the verb stem, e.g. <span class="word lang_fs">skrivend</span> ~ <span class="word lang_en">writing</span>.</p>
6
-	<p>The <span class="grammarterm">passive participle</span> is formed by appending <span class="word lang_fs">-et</span> to the verb stem, e.g. <span class="word lang_fs">skrivet</span> ~ <span class="word lang_en">written</span>. If pronouncable, the <span class="word lang_fs">e</span> in the ending can be omitted, e.g. <span class="word lang_fs">skrivt</span>.</p>
5
+	<p>The <span class="grammarterm">active participle</span> is formed by appending <?php echo(mark("-end", ["type_word", "lang_fs"])); ?> to the verb stem, e.g. <?php echo(format_correlation("type_word")(["fs" => ["skrivend"], "en" => ["writing"]])); ?>.</p>
6
+	<p>The <span class="grammarterm">passive participle</span> is formed by appending <?php echo(mark("-et", ["type_word", "lang_fs"])); ?> to the verb stem, e.g. <?php echo(format_correlation("type_word")(["fs" => ["skrivet"], "en" => ["written"]])); ?>. If pronouncable, the <?php echo(mark("e", ["type_letter", "lang_fs"])); ?> in the ending can be omitted, e.g. <?php echo(mark("skrivt", ["type_word", "lang_fs"])); ?>.</p>
7 7
 </section>
8 8
 
... ...
@@ -6,20 +6,20 @@
6 6
 <?php
7 7
 	$entries =
8 8
 	[
9
-		["original" => ["mute"], "translated" => ["to must"]],
10
-		["original" => ["köne"], "translated" => ["to can"]],
11
-		["original" => ["vile"], "translated" => ["to will"]],
12
-		["original" => ["skale"], "translated" => ["to shall"]],
13
-		// ["original" => ["darfe"], "translated" => ["to be allowed to"]],
9
+		["fs" => ["mute"], "en" => ["to must"]],
10
+		["fs" => ["köne"], "en" => ["to can"]],
11
+		["fs" => ["vile"], "en" => ["to will"]],
12
+		["fs" => ["skale"], "en" => ["to shall"]],
13
+		// ["fs" => ["darfe"], "en" => ["to be allowed to"]],
14 14
 	];
15 15
 	foreach ($entries as $entry)
16 16
 	{
17 17
  ?>
18
-		<li><?php echo(call_user_func(_bar("word"), $entry)); ?></li>
18
+		<li><?php echo(format_correlation("type_word")($entry)); ?></li>
19 19
 <?php
20 20
 	}
21 21
  ?>
22 22
 	</ul>
23
-	<p>Modal verbs in contrast to normal verbs never take an extended infinitive as object, e.g. <?php echo(call_user_func(_bar("sentence"), ["original" => ["Vi hop tu finde vater har."], "translated" => ["We hope to find water here."]])); ?>, but <?php echo(call_user_func(_bar("sentence"), ["original" => ["Vi kön finde vater har."], "translated" => ["We can find water here."]])); ?></p>
23
+	<p>Modal verbs in contrast to normal verbs never take an extended infinitive as object, e.g. <?php echo(format_correlation("type_sentence")(["fs" => ["Vi hop tu finde vater har."], "en" => ["We hope to find water here."]])); ?>, but <?php echo(format_correlation("type_sentence")(["fs" => ["Vi kön finde vater har."], "en" => ["We can find water here."]])); ?></p>
24 24
 </section>
25 25
 
... ...
@@ -1,9 +1,9 @@
1 1
 <section class="subsection" id="negation">
2 2
 	<header>Negation</header>
3 3
 	<?php proposal(); ?>
4
-	<p>In order to negate the meaning of a verb, one places the word <span class="word lang_fs">nit</span> after the verb. Example: <?php echo(call_user_func(_bar("sentence"), ["original" => ["Di se nit."], "translated" => ["They don't see."]])); ?></p>
5
-	<p>If the verb takes a direct object it is allowed to place the object before the <span class="word lang_fs">nit</span>. Example: <?php echo(call_user_func(_bar("sentence"), ["original" => ["Di se us nit."], "translated" => ["They don't see us."]])); ?></p>
6
-	<p>Negations can also be expressed implicitly by using negative correlatives. Example: <?php echo(call_user_func(_bar("sentence"), ["original" => ["Di se ing tid."], "translated" => ["They never see."]])); ?></p>
7
-	<p>Doubled negations (both explicit and implicit ones) cancel each other out. Example: <?php echo(call_user_func(_bar("sentence"), ["original" => ["Di se nit ing tid."], "translated" => ["They never don't see.", "They always see."]])); ?></p>
4
+	<p>In order to negate the meaning of a verb, one places the word <?php echo(mark("nit", ["type_word", "lang_fs"])); ?> after the verb. Example: <?php echo(format_correlation("type_sentence")(["fs" => ["Di se nit."], "en" => ["They don't see."]])); ?></p>
5
+	<p>If the verb takes a direct object it is allowed to place the object before the <?php echo(mark("nit", ["type_word", "lang_fs"])); ?>. Example: <?php echo(format_correlation("type_sentence")(["fs" => ["Di se us nit."], "en" => ["They don't see us."]])); ?></p>
6
+	<p>Negations can also be expressed implicitly by using negative correlatives. Example: <?php echo(format_correlation("type_sentence")(["fs" => ["Di se ing tid."], "en" => ["They never see."]])); ?></p>
7
+	<p>Doubled negations (both explicit and implicit ones) cancel each other out. Example: <?php echo(format_correlation("type_sentence")(["fs" => ["Di se nit ing tid."], "en" => ["They never don't see.", "They always see."]])); ?></p>
8 8
 </section>
9 9
 
... ...
@@ -1,6 +1,6 @@
1 1
 <section class="subsection" id="numeri">
2 2
 	<header>Numeri</header>
3 3
 	<?php proposal(); ?>
4
-	<p>The plural of a noun is formed by appending the syllable <span class="word lang_fs">-er</span>, e.g. <span class="word lang_fs">huser</span> ~ <span class="word lang_en">houses</span>.</p>
4
+	<p>The plural of a noun is formed by appending the syllable <?php echo(mark("-er", ["type_word", "lang_fs"])); ?>, e.g. <?php echo(format_correlation("type_word")(["fs" => ["huser"], "en" => ["houses"]])); ?>.</p>
5 5
 </section>
6 6
 
... ...
@@ -129,66 +129,30 @@ function convert_genus($genus) {return [0 => "common", 1 => "masculine", 2 => "f
129 129
 			{
130 130
 				return $values;
131 131
 			},
132
-			"data_formatter" => function ($value)
133
-			{
134
-				switch (1)
135
-				{
136
-					case 0:
137
-					{
138
-						return _baz($value[0]["words"], "word", "fs");
139
-						// break;
140
-					}
141
-					case 1:
142
-					{
143
-						global $configuration;
144
-						$value_ = [];
145
-						foreach (["fs",$configuration["target"]] as $language_id)
146
-						{
147
-							$value_[$language_id] = array_reduce
148
-							(
149
-								array_map
150
-								(
151
-									function ($dataset) {return $dataset["words"];},
152
-									array_filter($value, function ($dataset) use (&$language_id) {return ($dataset["language_id"] == $language_id);})
153
-								),
154
-								function ($x, $y) {return array_merge($x, $y);},
155
-								[]
156
-							);
157
-						}
158
-						return (
159
-							_bar("word")
160
-							(
161
-								[
162
-									"original" => $value_["fs"],
163
-									"translated" => $value_[$configuration["target"]],
164
-								]
165
-							)
166
-						);
167
-						// break;
168
-					}
169
-					default:
170
-					{
171
-						return json_encode($value);
172
-						// break;
173
-					}
174
-				}
175
-			},
132
+			"data_formatter" => function_chain
133
+			(
134
+				[
135
+					object_from_array("language_id"),
136
+					object_map(object_attribute("words")),
137
+					format_correlation("type_word"),
138
+				]
139
+			),
176 140
 		]
177 141
 	)->generate();
178 142
  ?>
179 143
 	<div class="note note_information">
180 144
 		<span class="note_content">
181
-			<p>Since the word <span class="word lang_fs">man</span> simply means <span class="word lang_en">human being</span>, it can be understood as an implicit way to express an abstract actor; similar words like <span class="word lang_fs">lüd</span> (<span class="word lang_en">people</span>) or <span class="word lang_fs">di</span> can be used as well.</p>
145
+			<p>Since the word <?php echo(mark("man", ["type_word", "lang_fs"])); ?> simply means <?php echo(mark("human being", ["type_word", "lang_en"])); ?>, it can be understood as an implicit way to express an abstract actor; similar words like <?php echo(mark("lüd", ["type_word", "lang_fs"])); ?> (<?php echo(mark("people", ["type_word", "lang_en"])); ?>) or <?php echo(mark("di", ["type_word", "lang_fs"])); ?> can be used as well.</p>
182 146
 		</span>
183 147
 	</div>
184 148
 	<div class="note note_information">
185 149
 		<span class="note_content">
186
-			<p>The honorific salutation is expressed by the plural form <span class="word lang_fs">je</span>; however it should be avoided in usual speech in favor of the singular form <span class="word lang_fs">du</span>.</p>
150
+			<p>The honorific salutation is expressed by the plural form <?php echo(mark("je", ["type_word", "lang_fs"])); ?>; however it should be avoided in usual speech in favor of the singular form <?php echo(mark("du", ["type_word", "lang_fs"])); ?>.</p>
187 151
 		</span>
188 152
 	</div>
189 153
 	<div class="note note_information">
190 154
 		<span class="note_content">
191
-			<p>A reflexive genitive can be formed by inserting the word <span class="word lang_fs">egen</span> (<span class="word lang_en">own</span>), for example <span class="sentence lang_fs">Han (A) hav givt to ham (B) hans egen buk.</span> ~ <span class="sentence lang_en">He (A) has given (to) him (B) his own book.</span> (A's book was given to B).</p>
155
+			<p>A reflexive genitive can be formed by inserting the word <?php echo(mark("egen", ["word", "lang_fs"])); ?> (<?php echo(mark("own", ["type_word", "lang_en"])); ?>), for example <?php echo(format_correlation("type_sentence")(["fs" => ["Han (A) hav givt to ham (B) hans egen buk."], "en" => ["He (A) has given (to) him (B) his own book."]])); ?> (A's book was given to B).</p>
192 156
 		</span>
193 157
 	</div>
194 158
 	<div class="note note_reasoning">
... ...
@@ -196,7 +160,7 @@ function convert_genus($genus) {return [0 => "common", 1 => "masculine", 2 => "f
196 160
 		<label class="note_label note_label_show" for="note_02">show</label>
197 161
 		<label class="note_label note_label_hide" for="note_02">hide</label>
198 162
 		<span class="note_content">
199
-			<p>When finding appropriate personal pronouns, the most intricate cases were the 3rd person singular and the 2nd person plural; both turned out to be very diverse among the modern Germanic languages. While for the 2nd person plural we could find a sufficient satisfying solution after a while, the 3rd person singular kept defying. In the end we came to the settlement to use a Swedish-like solution including the pronoun <span class="word lang_fs">hen</span>, which is not bound to any sexus so that it can be used for actors in general.</p>
163
+			<p>When finding appropriate personal pronouns, the most intricate cases were the 3rd person singular and the 2nd person plural; both turned out to be very diverse among the modern Germanic languages. While for the 2nd person plural we could find a sufficient satisfying solution after a while, the 3rd person singular kept defying. In the end we came to the settlement to use a Swedish-like solution including the pronoun <?php echo(mark("hen", ["type_word", "lang_fs"])); ?>, which is not bound to any sexus so that it can be used for actors in general.</p>
200 164
 		</span>
201 165
 	</div>
202 166
 </section>
... ...
@@ -87,7 +87,7 @@
87 87
  ?>
88 88
  	<div class="note note_information">
89 89
 		<span class="note_content">
90
-	 		<p>It is permitted to pronounce the sounds a little differently, for example <span class="letter lang_fs">v</span> as <span class="ipa">ʋ</span> or <span class="letter lang_fs">s</span> as <span class="ipa">z</span>, whilst the sounds from the table above are the default.</p>
90
+	 		<p>It is permitted to pronounce the sounds a little differently, for example <?php echo(mark("v", ["type_letter", "lang_fs"])); ?> as <span class="ipa">ʋ</span> or <?php echo(mark("s", ["type_letter", "lang_fs"])); ?> as <span class="ipa">z</span>, whilst the sounds from the table above are the default.</p>
91 91
 		</span>
92 92
  	</div>
93 93
 	<div class="note note_warning">
... ...
@@ -100,7 +100,7 @@
100 100
 		<label class="note_label note_label_show" for="note_00">show</label>
101 101
 		<label class="note_label note_label_hide" for="note_00">hide</label>
102 102
 		<span class="note_content">
103
-			<p>We have discussed many times whether to include a <span class="ipa">x</span>-like sound. On one hand, without it, some words were not easy to derive (e.g. the Proto Germanic <span class="word lang_pg">nahts</span> (English: <span class="word lang_en">night</span>)). On the other hand we found that the sound is very disconcerting to those, who don't have it the phonology of their mother tongue. Eventually we have decided to exclude it from the draft, since it seemed to be too much of a trouble maker; finding words was not that much of an issue in the end.</p>
103
+			<p>We have discussed many times whether to include a <span class="ipa">x</span>-like sound. On one hand, without it, some words were not easy to derive (e.g. the Proto Germanic <?php echo(mark("nahts", ["type_word", "lang_pg"])); ?> (English: <?php echo(mark("night", ["type_word", "lang_en"])); ?>)). On the other hand we found that the sound is very disconcerting to those, who don't have it in the phonology of their mother tongue. Eventually we have decided to exclude it from the draft, since it seemed to be too much of a trouble maker; finding words was not that much of an issue in the end.</p>
104 104
 		</span>
105 105
 	</div>
106 106
 	<div class="note note_reasoning">
... ...
@@ -108,8 +108,8 @@
108 108
 		<label class="note_label note_label_show" for="note_01">show</label>
109 109
 		<label class="note_label note_label_hide" for="note_01">hide</label>
110 110
 		<span class="note_content">
111
-			<p>The letters <span class="letter lang_fs">ö</span> and <span class="letter lang_fs">ü</span> were not included inconsiderately. Factually every Germanic language has an <span class="ipa">ø</span>-like sound in its phonology, but the main reason for the inclusion of these sounds was that altering the vowels of affected words to "near" vowels (e.g. <span class="ipa">i</span> &larr; <span class="ipa">y</span> &rarr; <span class="ipa">u</span>) most of the times resulted in disconcerting and unsatisfying creations. However the modern Germanic languages often feature vowel shifts throughout their natural evolution; some switching to the one and some switching to the other. Therefore we felt is was more convenient to have these sounds as compromises and connectors between the languages.</p>
112
-			<p>We also struggled to find proper written representations fo these sounds. One possibility was to use the IPA-like symbols <span class="letter lang_fs">ø</span> and <span class="letter lang_fs">y</span>, like e.g. Norwegian does. Unfortunatelly this had taken away the possibility to have the alternative writings <span class="letter lang_fs">oy</span> and <span class="letter lang_fs">uy</span>, which we considered important, since not everybody can easily type non-standard Latin letters. So we arranged to use diaeresis, like German and Swedish does.</p>
111
+			<p>The letters <?php echo(mark("ö", ["type_letter", "lang_fs"])); ?> and <?php echo(mark("ü", ["type_letter", "lang_fs"])); ?> were not included inconsiderately. Effectively every Germanic language has an <span class="ipa">ø</span>-like sound in its phonology, but the main reason for the inclusion of these sounds was that altering the vowels of affected words to "near" vowels (e.g. <span class="ipa">i</span> &larr; <span class="ipa">y</span> &rarr; <span class="ipa">u</span>) most of the times resulted in disconcerting and unsatisfying creations. However the modern Germanic languages often feature vowel shifts throughout their natural evolution; some switching to the one and some switching to the other. Therefore we felt it was more convenient to have these sounds as compromises and connectors between the languages.</p>
112
+			<p>We also struggled to find proper written representations of these sounds. One possibility was to use the IPA-like symbols <?php echo(mark("ø", ["type_letter", "lang_fs"])); ?> and <?php echo(mark("y", ["type_letter", "lang_fs"])); ?>, like e.g. Norwegian does. Unfortunatelly this had taken away the possibility to have the alternative writings <?php echo(mark("oy", ["type_letter", "lang_fs"])); ?> and <?php echo(mark("uy", ["type_letter", "lang_fs"])); ?>, which we considered important, since not everybody can easily type non-standard Latin letters. So we arranged to use diaeresis, like German and Swedish does.</p>
113 113
 		</span>
114 114
 	</div>
115 115
 </section>
... ...
@@ -1,6 +1,97 @@
1
+<?php
2
+global $configuration;
3
+include_once("source/logic/server/data.php");
4
+include_once("source/logic/server/sql.php");
5
+include_once("source/logic/server/table.php");
6
+ ?>
1 7
 <section class="section" id="principles">
2 8
 	<header>Principles</header>
3 9
 	<p>The word stock of Folksprak is &dash; with minor &dash; exceptions derived from the modern Germanic languages (e.g. English, German, Swedish, &#8230;) and/or their precursors (e.g. Old English, Old Norse, Proto Germanic, etc.). However branches, which no longer emerge today (e.g. the East Germanic languages like Gothic), were not incorporated.</p>
4
-	<span class="todo">more (e.g. typical transitions)</span>
10
+	<p>The following table gives an overview about the typical phoneme-transitions with example words in square brackets:</p>
11
+	<span class="todo">more entries</span>
12
+<?php
13
+	$data_transitions = read_json("source/data/transitions.json");
14
+	
15
+	$data = $data_transitions["data"];
16
+	// $data = sql_select($data, function ($row) {return in_array($row["language_id"], ["pg","fs","en"]);});
17
+	
18
+	$table = new class_table
19
+	(
20
+		[
21
+			new class_column("Transition", "transition_id"),
22
+			new class_column("Language", "language_id"),
23
+			new class_column("Phonemes", "phonemes"),
24
+			new class_column("Examples", "examples"),
25
+		],
26
+		$data
27
+	);
28
+	
29
+	$table->snap
30
+	(
31
+		[
32
+			"label_vertical" => function ($column) {return "";},
33
+			"columns_vertical" =>
34
+			[
35
+				$table->columns_get()[0],
36
+			],
37
+			"label_horizontal" => function ($column, $value) {return $value;},
38
+			"columns_horizontal" =>
39
+			[
40
+				$table->columns_get()[1],
41
+			],
42
+			"columns_data" =>
43
+			[
44
+				$table->columns_get()[1],
45
+				$table->columns_get()[2],
46
+				$table->columns_get()[3],
47
+			],
48
+			"data_aggregator" => function ($values)
49
+			{
50
+				return $values;
51
+			},
52
+			"data_formatter" => function ($values)
53
+			{
54
+				if (count($values) == 1)
55
+				{
56
+					$phonemes = implode(
57
+						", ",
58
+						array_map
59
+						(
60
+							function ($phoneme) use (&$values)
61
+							{
62
+								return mark($phoneme, ["type_word", "lang_" . $values[0]["language_id"]]);
63
+							},
64
+							$values[0]["phonemes"]
65
+						)
66
+					);
67
+					$examples = implode
68
+					(
69
+						", ",
70
+						array_map
71
+						(
72
+							function ($word) use (&$values)
73
+							{
74
+								return mark($word, ["type_word", "lang_" . $values[0]["language_id"]]);
75
+							},
76
+							array_slice($values[0]["examples"], 0, 1)
77
+						)
78
+					);
79
+					$output = $phonemes;
80
+					if (count($values[0]["examples"]) > 0)
81
+					{
82
+						$break = true;
83
+						$breaker = $break ? "<br/>" : " ";
84
+						$output .= "${breaker}[${examples}]";
85
+					}
86
+					return $output;
87
+				}
88
+				else
89
+				{
90
+					return "?";
91
+				}
92
+			},
93
+		]
94
+	)->generate();
95
+ ?>
5 96
 </section>
6 97
 
... ...
@@ -31,14 +31,14 @@
31 31
 			"scheme",
32 32
 			function ($value)
33 33
 			{
34
-				return format($value, ["word", "lang_fs"]);
34
+				return format($value, ["type_word", "lang_fs"]);
35 35
 			}
36 36
 		),
37 37
 		new class_column
38 38
 		(
39 39
 			"Example",
40 40
 			"example_",
41
-			_bar("sentence")
41
+			_bar("type_sentence")
42 42
 		),
43 43
 	],
44 44
 	sql_condense
... ...
@@ -53,8 +53,8 @@
53 53
 	)
54 54
 ))->generate();
55 55
 ?>
56
-	<p>Since these forms are built with auxiliary verbs, they can be combined straightforward to form complex expressions, e.g. <?php echo(call_user_func(_bar("sentence"), ["original" => ["Ek skal have skrivt."], "translated" => ["I will have written."]])); ?><!-- or <?php echo(call_user_func(_bar("sentence"), ["original" => ["Ek hav skalt skrive."], "translated" => ["I was going to write."]])); ?> -->.</p>
57
-	<p>The <span class="grammarterm">imperative</span> only exists in the present (with future meaning) for the 2nd person singular and plural. It is formed by using the bare stem of the verb, optionally followed by the personal pronoun (i.e. either <span class="word lang_fs">du</span> or <span class="word lang_fs">je</span>) in order to specify or emphasize the numerus. Examples: <span class="sentence lang_fs">skriv!</span>, <span class="sentence lang_fs">skriv, je!</span>.</p>
56
+	<p>Since these forms are built with auxiliary verbs, they can be combined straightforward to form complex expressions, e.g. <?php echo(format_correlation("type_sentence")(["fs" => ["Ek skal have skrivt."], "en" => ["I will have written."]])); ?><!-- or <?php echo(format_correlation("type_sentence")(["fs" => ["Ek hav skalt skrive."], "en" => ["I was going to write."]])); ?> -->.</p>
57
+	<p>The <span class="grammarterm">imperative</span> only exists in the present (with future meaning) for the 2nd person singular and plural. It is formed by using the bare stem of the verb, optionally followed by the personal pronoun (i.e. either <?php echo(mark("du", ["type_word", "lang_fs"])); ?> or <?php echo(mark("je", ["type_word", "lang_fs"])); ?>) in order to specify or emphasize the numerus. Examples: <?php echo(mark("skriv!", ["type_sentence", "lang_fs"])); ?>, <?php echo(mark("skriv, je!", ["type_sentence", "lang_fs"])); ?>.</p>
58 58
 	<span class="todo">conjunctive</span>
59 59
 </section>
60 60
 
... ...
@@ -17,7 +17,7 @@
17 17
 				"affix",
18 18
 				function ($value)
19 19
 				{
20
-					return mark($value, ["word", "lang_fs"]);
20
+					return mark($value, ["type_word", "lang_fs"]);
21 21
 				}
22 22
 			),
23 23
 			new class_column
... ...
@@ -70,6 +70,12 @@
70 70
 				"Example",
71 71
 				"example_",
72 72
 				_bar("word")
73
+				/*
74
+				function ($x)
75
+				{
76
+					return json_encode($x);
77
+				}
78
+				 */
73 79
 			),
74 80
 		],
75 81
 		sql_condense
... ...
@@ -89,10 +95,9 @@
89 95
 <p>
90 96
 	Some complex examples:
91 97
 	<ul>
92
-		<?php $fun = _bar("word"); ?>
93
-		<li><?php echo($fun(["original" => ["unmanlikhed"], "translated" => ["inhumanity"]])); ?></li>
94
-		<li><?php echo($fun(["original" => ["seberenung"], "translated" => ["visualization"]])); ?></li>
95
-		<li><?php echo($fun(["original" => ["kraftigenar"], "translated" => ["fortifier"]])); ?></li>
98
+		<li><?php echo(format_correlation("word")(["fs" => ["unmanlikhed"], "en" => ["inhumanity"]])); ?></li>
99
+		<li><?php echo(format_correlation("word")(["fs" => ["seberenung"], "en" => ["visualization"]])); ?></li>
100
+		<li><?php echo(format_correlation("word")(["fs" => ["kraftigenar"], "en" => ["fortifier"]])); ?></li>
96 101
 	</ul>
97 102
 </p>
98 103
 </section>
... ...
@@ -1,126 +1,156 @@
1 1
 {
2 2
 	"situations": [
3
-		{"id": "x00", "name": "x00"},
4
-		{"id": "x01", "name": "x01"},
5
-		{"id": "x02", "name": "x02"},
6
-		{"id": "x03", "name": "x03"},
7
-		{"id": "x04", "name": "x04"},
8
-		{"id": "x05", "name": "x05"},
9
-		{"id": "x06", "name": "x06"},
10
-		{"id": "x07", "name": "x07"},
11
-		{"id": "x08", "name": "x08"},
12
-		{"id": "x09", "name": "x09"}
3
+		{"id": "x00", "name": "fore"},
4
+		{"id": "x01", "name": "back"},
5
+		{"id": "x02", "name": "up"},
6
+		{"id": "x03", "name": "down"},
7
+		{"id": "x04", "name": "left"},
8
+		{"id": "x05", "name": "right"},
9
+		{"id": "x06", "name": "in"},
10
+		{"id": "x07", "name": "out"},
11
+		{"id": "x08", "name": "on"},
12
+		{"id": "x09", "name": "between"}
13 13
 	],
14 14
 	"types": [
15 15
 		{"id": "pos", "name": "Positive"},
16 16
 		{"id": "dir", "name": "Directive"}
17 17
 	],
18
-	"kinds": [
18
+	"references": [
19 19
 		{"id": "abs", "name": "Absolute"},
20 20
 		{"id": "rel", "name": "Relative"},
21 21
 		{"id": "att", "name": "Attributive"}
22 22
 	],
23 23
 	"words": [
24
-		{"language_id": "fs", "situation_id": "x00", "type_id": "pos", "kind_id": "abs", "words": ["for"]},
25
-		{"language_id": "fs", "situation_id": "x00", "type_id": "pos", "kind_id": "rel", "words": ["for (lut)"]},
26
-		{"language_id": "fs", "situation_id": "x00", "type_id": "pos", "kind_id": "att", "words": ["for arend"]},
27
-		{"language_id": "fs", "situation_id": "x00", "type_id": "dir", "kind_id": "abs", "words": ["to for"]},
28
-		{"language_id": "fs", "situation_id": "x00", "type_id": "dir", "kind_id": "rel", "words": ["to for (lut)"]},
29
-		{"language_id": "fs", "situation_id": "x01", "type_id": "pos", "kind_id": "abs", "words": ["ruk"]},
30
-		{"language_id": "fs", "situation_id": "x01", "type_id": "pos", "kind_id": "rel", "words": ["ruk (lut)"]},
31
-		{"language_id": "fs", "situation_id": "x01", "type_id": "pos", "kind_id": "att", "words": ["ruk arend"]},
32
-		{"language_id": "fs", "situation_id": "x01", "type_id": "dir", "kind_id": "abs", "words": ["to ruk"]},
33
-		{"language_id": "fs", "situation_id": "x01", "type_id": "dir", "kind_id": "rel", "words": ["to ruk (lut)"]},
34
-		{"language_id": "fs", "situation_id": "x02", "type_id": "pos", "kind_id": "abs", "words": ["top"]},
35
-		{"language_id": "fs", "situation_id": "x02", "type_id": "pos", "kind_id": "rel", "words": ["top (lut)"]},
36
-		{"language_id": "fs", "situation_id": "x02", "type_id": "pos", "kind_id": "att", "words": ["top arend"]},
37
-		{"language_id": "fs", "situation_id": "x02", "type_id": "dir", "kind_id": "abs", "words": ["to top"]},
38
-		{"language_id": "fs", "situation_id": "x02", "type_id": "dir", "kind_id": "rel", "words": ["to top (lut)"]},
39
-		{"language_id": "fs", "situation_id": "x03", "type_id": "pos", "kind_id": "abs", "words": ["ned"]},
40
-		{"language_id": "fs", "situation_id": "x03", "type_id": "pos", "kind_id": "rel", "words": ["ned (lut)"]},
41
-		{"language_id": "fs", "situation_id": "x03", "type_id": "pos", "kind_id": "att", "words": ["ned arend"]},
42
-		{"language_id": "fs", "situation_id": "x03", "type_id": "dir", "kind_id": "abs", "words": ["to ned"]},
43
-		{"language_id": "fs", "situation_id": "x03", "type_id": "dir", "kind_id": "rel", "words": ["to ned (lut)"]},
44
-		{"language_id": "fs", "situation_id": "x04", "type_id": "pos", "kind_id": "abs", "words": ["vinst"]},
45
-		{"language_id": "fs", "situation_id": "x04", "type_id": "pos", "kind_id": "rel", "words": ["vinst (lut)"]},
46
-		{"language_id": "fs", "situation_id": "x04", "type_id": "pos", "kind_id": "att", "words": ["vinst arend"]},
47
-		{"language_id": "fs", "situation_id": "x04", "type_id": "dir", "kind_id": "abs", "words": ["to vinst"]},
48
-		{"language_id": "fs", "situation_id": "x04", "type_id": "dir", "kind_id": "rel", "words": ["to vinst (lut)"]},
49
-		{"language_id": "fs", "situation_id": "x05", "type_id": "pos", "kind_id": "abs", "words": ["hög"]},
50
-		{"language_id": "fs", "situation_id": "x05", "type_id": "pos", "kind_id": "rel", "words": ["hög (lut)"]},
51
-		{"language_id": "fs", "situation_id": "x05", "type_id": "pos", "kind_id": "att", "words": ["hög arend"]},
52
-		{"language_id": "fs", "situation_id": "x05", "type_id": "dir", "kind_id": "abs", "words": ["to hög"]},
53
-		{"language_id": "fs", "situation_id": "x05", "type_id": "dir", "kind_id": "rel", "words": ["to hög (lut)"]},
54
-		{"language_id": "fs", "situation_id": "x06", "type_id": "pos", "kind_id": "abs", "words": ["ine"]},
55
-		{"language_id": "fs", "situation_id": "x06", "type_id": "pos", "kind_id": "rel", "words": ["ine (lut)"]},
56
-		{"language_id": "fs", "situation_id": "x06", "type_id": "pos", "kind_id": "att", "words": ["ine arend"]},
57
-		{"language_id": "fs", "situation_id": "x06", "type_id": "dir", "kind_id": "abs", "words": ["in"]},
58
-		{"language_id": "fs", "situation_id": "x06", "type_id": "dir", "kind_id": "rel", "words": ["in (lut)"]},
59
-		{"language_id": "fs", "situation_id": "x07", "type_id": "pos", "kind_id": "abs", "words": ["ute"]},
60
-		{"language_id": "fs", "situation_id": "x07", "type_id": "pos", "kind_id": "rel", "words": ["ute (lut)"]},
61
-		{"language_id": "fs", "situation_id": "x07", "type_id": "pos", "kind_id": "att", "words": ["ute arend"]},
62
-		{"language_id": "fs", "situation_id": "x07", "type_id": "dir", "kind_id": "abs", "words": ["ut"]},
63
-		{"language_id": "fs", "situation_id": "x07", "type_id": "dir", "kind_id": "rel", "words": ["ut (lut)"]},
64
-		{"language_id": "fs", "situation_id": "x08", "type_id": "pos", "kind_id": "abs", "words": ["upe"]},
65
-		{"language_id": "fs", "situation_id": "x08", "type_id": "pos", "kind_id": "rel", "words": ["upe (lut)"]},
66
-		{"language_id": "fs", "situation_id": "x08", "type_id": "pos", "kind_id": "att", "words": ["upe arend"]},
67
-		{"language_id": "fs", "situation_id": "x08", "type_id": "dir", "kind_id": "abs", "words": ["up"]},
68
-		{"language_id": "fs", "situation_id": "x08", "type_id": "dir", "kind_id": "rel", "words": ["up (lut)"]},
69
-		{"language_id": "fs", "situation_id": "x09", "type_id": "pos", "kind_id": "abs", "words": ["mel"]},
70
-		{"language_id": "fs", "situation_id": "x09", "type_id": "pos", "kind_id": "rel", "words": ["mel (lut)"]},
71
-		{"language_id": "fs", "situation_id": "x09", "type_id": "pos", "kind_id": "att", "words": ["mel arend"]},
72
-		{"language_id": "fs", "situation_id": "x09", "type_id": "dir", "kind_id": "abs", "words": ["to mel"]},
73
-		{"language_id": "fs", "situation_id": "x09", "type_id": "dir", "kind_id": "rel", "words": ["to mel (lut)"]},
74
-		{"language_id": "en", "situation_id": "x00", "type_id": "pos", "kind_id": "abs", "words": ["in front"]},
75
-		{"language_id": "en", "situation_id": "x00", "type_id": "pos", "kind_id": "rel", "words": ["in front of"]},
76
-		{"language_id": "en", "situation_id": "x00", "type_id": "pos", "kind_id": "att", "words": ["fore", "front"]},
77
-		{"language_id": "en", "situation_id": "x00", "type_id": "dir", "kind_id": "abs", "words": ["forward"]},
78
-		{"language_id": "en", "situation_id": "x00", "type_id": "dir", "kind_id": "rel", "words": ["in front of"]},
79
-		{"language_id": "en", "situation_id": "x01", "type_id": "pos", "kind_id": "abs", "words": ["back"]},
80
-		{"language_id": "en", "situation_id": "x01", "type_id": "pos", "kind_id": "rel", "words": ["behind"]},
81
-		{"language_id": "en", "situation_id": "x01", "type_id": "pos", "kind_id": "att", "words": ["rear", "hind"]},
82
-		{"language_id": "en", "situation_id": "x01", "type_id": "dir", "kind_id": "abs", "words": ["backward", "behind"]},
83
-		{"language_id": "en", "situation_id": "x01", "type_id": "dir", "kind_id": "rel", "words": ["behind"]},
84
-		{"language_id": "en", "situation_id": "x02", "type_id": "pos", "kind_id": "abs", "words": ["on top"]},
85
-		{"language_id": "en", "situation_id": "x02", "type_id": "pos", "kind_id": "rel", "words": ["over", "above"]},
86
-		{"language_id": "en", "situation_id": "x02", "type_id": "pos", "kind_id": "att", "words": ["upper"]},
87
-		{"language_id": "en", "situation_id": "x02", "type_id": "dir", "kind_id": "abs", "words": ["up"]},
88
-		{"language_id": "en", "situation_id": "x02", "type_id": "dir", "kind_id": "rel", "words": ["over", "above"]},
89
-		{"language_id": "en", "situation_id": "x03", "type_id": "pos", "kind_id": "abs", "words": ["below"]},
90
-		{"language_id": "en", "situation_id": "x03", "type_id": "pos", "kind_id": "rel", "words": ["under"]},
91
-		{"language_id": "en", "situation_id": "x03", "type_id": "pos", "kind_id": "att", "words": ["lower"]},
92
-		{"language_id": "en", "situation_id": "x03", "type_id": "dir", "kind_id": "abs", "words": ["down"]},
93
-		{"language_id": "en", "situation_id": "x03", "type_id": "dir", "kind_id": "rel", "words": ["under"]},
94
-		{"language_id": "en", "situation_id": "x04", "type_id": "pos", "kind_id": "abs", "words": ["left"]},
95
-		{"language_id": "en", "situation_id": "x04", "type_id": "pos", "kind_id": "rel", "words": ["left from"]},
96
-		{"language_id": "en", "situation_id": "x04", "type_id": "pos", "kind_id": "att", "words": ["left"]},
97
-		{"language_id": "en", "situation_id": "x04", "type_id": "dir", "kind_id": "abs", "words": ["to the left"]},
98
-		{"language_id": "en", "situation_id": "x04", "type_id": "dir", "kind_id": "rel", "words": ["to the left of"]},
99
-		{"language_id": "en", "situation_id": "x05", "type_id": "pos", "kind_id": "abs", "words": ["right"]},
100
-		{"language_id": "en", "situation_id": "x05", "type_id": "pos", "kind_id": "rel", "words": ["right from"]},
101
-		{"language_id": "en", "situation_id": "x05", "type_id": "pos", "kind_id": "att", "words": ["right"]},
102
-		{"language_id": "en", "situation_id": "x05", "type_id": "dir", "kind_id": "abs", "words": ["to the right"]},
103
-		{"language_id": "en", "situation_id": "x05", "type_id": "dir", "kind_id": "rel", "words": ["to the right of"]},
104
-		{"language_id": "en", "situation_id": "x06", "type_id": "pos", "kind_id": "abs", "words": ["inside"]},
105
-		{"language_id": "en", "situation_id": "x06", "type_id": "pos", "kind_id": "rel", "words": ["in", "inside from"]},
106
-		{"language_id": "en", "situation_id": "x06", "type_id": "pos", "kind_id": "att", "words": ["inner"]},
107
-		{"language_id": "en", "situation_id": "x06", "type_id": "dir", "kind_id": "abs", "words": ["in"]},
108
-		{"language_id": "en", "situation_id": "x06", "type_id": "dir", "kind_id": "rel", "words": ["into"]},
109
-		{"language_id": "en", "situation_id": "x07", "type_id": "pos", "kind_id": "abs", "words": ["outside"]},
110
-		{"language_id": "en", "situation_id": "x07", "type_id": "pos", "kind_id": "rel", "words": ["out", "outside from"]},
111
-		{"language_id": "en", "situation_id": "x07", "type_id": "pos", "kind_id": "att", "words": ["outer"]},
112
-		{"language_id": "en", "situation_id": "x07", "type_id": "dir", "kind_id": "abs", "words": ["out"]},
113
-		{"language_id": "en", "situation_id": "x07", "type_id": "dir", "kind_id": "rel", "words": ["out of"]},
114
-		{"language_id": "en", "situation_id": "x08", "type_id": "pos", "kind_id": "abs", "words": ["upon"]},
115
-		{"language_id": "en", "situation_id": "x08", "type_id": "pos", "kind_id": "rel", "words": ["thereon"]},
116
-		{"language_id": "en", "situation_id": "x08", "type_id": "pos", "kind_id": "att", "words": []},
117
-		{"language_id": "en", "situation_id": "x08", "type_id": "dir", "kind_id": "abs", "words": ["on"]},
118
-		{"language_id": "en", "situation_id": "x08", "type_id": "dir", "kind_id": "rel", "words": ["onto"]},
119
-		{"language_id": "en", "situation_id": "x09", "type_id": "pos", "kind_id": "abs", "words": ["inbetween"]},
120
-		{"language_id": "en", "situation_id": "x09", "type_id": "pos", "kind_id": "rel", "words": ["between"]},
121
-		{"language_id": "en", "situation_id": "x09", "type_id": "pos", "kind_id": "att", "words": ["middle"]},
122
-		{"language_id": "en", "situation_id": "x09", "type_id": "dir", "kind_id": "abs", "words": ["between"]},
123
-		{"language_id": "en", "situation_id": "x09", "type_id": "dir", "kind_id": "rel", "words": ["between"]}
24
+		{"language_id": "fs", "situation_id": "x00", "type_id": "pos", "reference_id": "abs", "words": ["for"]},
25
+		{"language_id": "fs", "situation_id": "x00", "type_id": "pos", "reference_id": "rel", "words": ["for (lut)"]},
26
+		{"language_id": "fs", "situation_id": "x00", "type_id": "pos", "reference_id": "att", "words": ["for arend"]},
27
+		{"language_id": "fs", "situation_id": "x00", "type_id": "dir", "reference_id": "abs", "words": ["to for"]},
28
+		{"language_id": "fs", "situation_id": "x00", "type_id": "dir", "reference_id": "rel", "words": ["to for (lut)"]},
29
+		{"language_id": "fs", "situation_id": "x01", "type_id": "pos", "reference_id": "abs", "words": ["bak"]},
30
+		{"language_id": "fs", "situation_id": "x01", "type_id": "pos", "reference_id": "rel", "words": ["bak (lut)"]},
31
+		{"language_id": "fs", "situation_id": "x01", "type_id": "pos", "reference_id": "att", "words": ["bak arend"]},
32
+		{"language_id": "fs", "situation_id": "x01", "type_id": "dir", "reference_id": "abs", "words": ["to bak"]},
33
+		{"language_id": "fs", "situation_id": "x01", "type_id": "dir", "reference_id": "rel", "words": ["to bak (lut)"]},
34
+		{"language_id": "fs", "situation_id": "x02", "type_id": "pos", "reference_id": "abs", "words": ["uver"]},
35
+		{"language_id": "fs", "situation_id": "x02", "type_id": "pos", "reference_id": "rel", "words": ["uver (lut)"]},
36
+		{"language_id": "fs", "situation_id": "x02", "type_id": "pos", "reference_id": "att", "words": ["uver arend"]},
37
+		{"language_id": "fs", "situation_id": "x02", "type_id": "dir", "reference_id": "abs", "words": ["to uver"]},
38
+		{"language_id": "fs", "situation_id": "x02", "type_id": "dir", "reference_id": "rel", "words": ["to uver (lut)"]},
39
+		{"language_id": "fs", "situation_id": "x03", "type_id": "pos", "reference_id": "abs", "words": ["neder"]},
40
+		{"language_id": "fs", "situation_id": "x03", "type_id": "pos", "reference_id": "rel", "words": ["neder (lut)"]},
41
+		{"language_id": "fs", "situation_id": "x03", "type_id": "pos", "reference_id": "att", "words": ["neder arend"]},
42
+		{"language_id": "fs", "situation_id": "x03", "type_id": "dir", "reference_id": "abs", "words": ["to neder"]},
43
+		{"language_id": "fs", "situation_id": "x03", "type_id": "dir", "reference_id": "rel", "words": ["to neder (lut)"]},
44
+		{"language_id": "fs", "situation_id": "x04", "type_id": "pos", "reference_id": "abs", "words": ["vinst"]},
45
+		{"language_id": "fs", "situation_id": "x04", "type_id": "pos", "reference_id": "rel", "words": ["vinst (lut)"]},
46
+		{"language_id": "fs", "situation_id": "x04", "type_id": "pos", "reference_id": "att", "words": ["vinst arend"]},
47
+		{"language_id": "fs", "situation_id": "x04", "type_id": "dir", "reference_id": "abs", "words": ["to vinst"]},
48
+		{"language_id": "fs", "situation_id": "x04", "type_id": "dir", "reference_id": "rel", "words": ["to vinst (lut)"]},
49
+		{"language_id": "fs", "situation_id": "x05", "type_id": "pos", "reference_id": "abs", "words": ["hög"]},
50
+		{"language_id": "fs", "situation_id": "x05", "type_id": "pos", "reference_id": "rel", "words": ["hög (lut)"]},
51
+		{"language_id": "fs", "situation_id": "x05", "type_id": "pos", "reference_id": "att", "words": ["hög arend"]},
52
+		{"language_id": "fs", "situation_id": "x05", "type_id": "dir", "reference_id": "abs", "words": ["to hög"]},
53
+		{"language_id": "fs", "situation_id": "x05", "type_id": "dir", "reference_id": "rel", "words": ["to hög (lut)"]},
54
+		{"language_id": "fs", "situation_id": "x06", "type_id": "pos", "reference_id": "abs", "words": ["ine"]},
55
+		{"language_id": "fs", "situation_id": "x06", "type_id": "pos", "reference_id": "rel", "words": ["ine (lut)"]},
56
+		{"language_id": "fs", "situation_id": "x06", "type_id": "pos", "reference_id": "att", "words": ["ine arend"]},
57
+		{"language_id": "fs", "situation_id": "x06", "type_id": "dir", "reference_id": "abs", "words": ["in"]},
58
+		{"language_id": "fs", "situation_id": "x06", "type_id": "dir", "reference_id": "rel", "words": ["in (lut)"]},
59
+		{"language_id": "fs", "situation_id": "x07", "type_id": "pos", "reference_id": "abs", "words": ["ute"]},
60
+		{"language_id": "fs", "situation_id": "x07", "type_id": "pos", "reference_id": "rel", "words": ["ute (lut)"]},
61
+		{"language_id": "fs", "situation_id": "x07", "type_id": "pos", "reference_id": "att", "words": ["ute arend"]},
62
+		{"language_id": "fs", "situation_id": "x07", "type_id": "dir", "reference_id": "abs", "words": ["ut"]},
63
+		{"language_id": "fs", "situation_id": "x07", "type_id": "dir", "reference_id": "rel", "words": ["ut (lut)"]},
64
+		{"language_id": "fs", "situation_id": "x08", "type_id": "pos", "reference_id": "abs", "words": ["upe"]},
65
+		{"language_id": "fs", "situation_id": "x08", "type_id": "pos", "reference_id": "rel", "words": ["upe (lut)"]},
66
+		{"language_id": "fs", "situation_id": "x08", "type_id": "pos", "reference_id": "att", "words": ["upe arend"]},
67
+		{"language_id": "fs", "situation_id": "x08", "type_id": "dir", "reference_id": "abs", "words": ["up"]},
68
+		{"language_id": "fs", "situation_id": "x08", "type_id": "dir", "reference_id": "rel", "words": ["up (lut)"]},
69
+		{"language_id": "fs", "situation_id": "x09", "type_id": "pos", "reference_id": "abs", "words": ["mel"]},
70
+		{"language_id": "fs", "situation_id": "x09", "type_id": "pos", "reference_id": "rel", "words": ["mel (lut)"]},
71
+		{"language_id": "fs", "situation_id": "x09", "type_id": "pos", "reference_id": "att", "words": ["mel arend"]},
72
+		{"language_id": "fs", "situation_id": "x09", "type_id": "dir", "reference_id": "abs", "words": ["to mel"]},
73
+		{"language_id": "fs", "situation_id": "x09", "type_id": "dir", "reference_id": "rel", "words": ["to mel (lut)"]},
74
+		{"language_id": "en", "situation_id": "x00", "type_id": "pos", "reference_id": "abs", "words": ["in front"]},
75
+		{"language_id": "en", "situation_id": "x00", "type_id": "pos", "reference_id": "rel", "words": ["in front of"]},
76
+		{"language_id": "en", "situation_id": "x00", "type_id": "pos", "reference_id": "att", "words": ["fore", "front"]},
77
+		{"language_id": "en", "situation_id": "x00", "type_id": "dir", "reference_id": "abs", "words": ["forward"]},
78
+		{"language_id": "en", "situation_id": "x00", "type_id": "dir", "reference_id": "rel", "words": ["in front of"]},
79
+		{"language_id": "en", "situation_id": "x01", "type_id": "pos", "reference_id": "abs", "words": ["back"]},
80
+		{"language_id": "en", "situation_id": "x01", "type_id": "pos", "reference_id": "rel", "words": ["behind"]},
81
+		{"language_id": "en", "situation_id": "x01", "type_id": "pos", "reference_id": "att", "words": ["rear", "hind"]},
82
+		{"language_id": "en", "situation_id": "x01", "type_id": "dir", "reference_id": "abs", "words": ["backward", "behind"]},
83
+		{"language_id": "en", "situation_id": "x01", "type_id": "dir", "reference_id": "rel", "words": ["behind"]},
84
+		{"language_id": "en", "situation_id": "x02", "type_id": "pos", "reference_id": "abs", "words": ["on top"]},
85
+		{"language_id": "en", "situation_id": "x02", "type_id": "pos", "reference_id": "rel", "words": ["over", "above"]},
86
+		{"language_id": "en", "situation_id": "x02", "type_id": "pos", "reference_id": "att", "words": ["upper"]},
87
+		{"language_id": "en", "situation_id": "x02", "type_id": "dir", "reference_id": "abs", "words": ["up"]},
88
+		{"language_id": "en", "situation_id": "x02", "type_id": "dir", "reference_id": "rel", "words": ["over", "above"]},
89
+		{"language_id": "en", "situation_id": "x03", "type_id": "pos", "reference_id": "abs", "words": ["below"]},
90
+		{"language_id": "en", "situation_id": "x03", "type_id": "pos", "reference_id": "rel", "words": ["under"]},
91
+		{"language_id": "en", "situation_id": "x03", "type_id": "pos", "reference_id": "att", "words": ["lower"]},
92
+		{"language_id": "en", "situation_id": "x03", "type_id": "dir", "reference_id": "abs", "words": ["down"]},
93
+		{"language_id": "en", "situation_id": "x03", "type_id": "dir", "reference_id": "rel", "words": ["under"]},
94
+		{"language_id": "en", "situation_id": "x04", "type_id": "pos", "reference_id": "abs", "words": ["left"]},
95
+		{"language_id": "en", "situation_id": "x04", "type_id": "pos", "reference_id": "rel", "words": ["left from"]},
96
+		{"language_id": "en", "situation_id": "x04", "type_id": "pos", "reference_id": "att", "words": ["left"]},
97
+		{"language_id": "en", "situation_id": "x04", "type_id": "dir", "reference_id": "abs", "words": ["to the left"]},
98
+		{"language_id": "en", "situation_id": "x04", "type_id": "dir", "reference_id": "rel", "words": ["to the left of"]},
99
+		{"language_id": "en", "situation_id": "x05", "type_id": "pos", "reference_id": "abs", "words": ["right"]},
100
+		{"language_id": "en", "situation_id": "x05", "type_id": "pos", "reference_id": "rel", "words": ["right from"]},
101
+		{"language_id": "en", "situation_id": "x05", "type_id": "pos", "reference_id": "att", "words": ["right"]},
102
+		{"language_id": "en", "situation_id": "x05", "type_id": "dir", "reference_id": "abs", "words": ["to the right"]},
103
+		{"language_id": "en", "situation_id": "x05", "type_id": "dir", "reference_id": "rel", "words": ["to the right of"]},
104
+		{"language_id": "en", "situation_id": "x06", "type_id": "pos", "reference_id": "abs", "words": ["inside"]},
105
+		{"language_id": "en", "situation_id": "x06", "type_id": "pos", "reference_id": "rel", "words": ["in", "inside from"]},
106
+		{"language_id": "en", "situation_id": "x06", "type_id": "pos", "reference_id": "att", "words": ["inner"]},
107
+		{"language_id": "en", "situation_id": "x06", "type_id": "dir", "reference_id": "abs", "words": ["in"]},
108
+		{"language_id": "en", "situation_id": "x06", "type_id": "dir", "reference_id": "rel", "words": ["into"]},
109
+		{"language_id": "en", "situation_id": "x07", "type_id": "pos", "reference_id": "abs", "words": ["outside"]},
110
+		{"language_id": "en", "situation_id": "x07", "type_id": "pos", "reference_id": "rel", "words": ["out", "outside from"]},
111
+		{"language_id": "en", "situation_id": "x07", "type_id": "pos", "reference_id": "att", "words": ["outer"]},
112
+		{"language_id": "en", "situation_id": "x07", "type_id": "dir", "reference_id": "abs", "words": ["out"]},
113
+		{"language_id": "en", "situation_id": "x07", "type_id": "dir", "reference_id": "rel", "words": ["out of"]},
114
+		{"language_id": "en", "situation_id": "x08", "type_id": "pos", "reference_id": "abs", "words": ["upon"]},
115
+		{"language_id": "en", "situation_id": "x08", "type_id": "pos", "reference_id": "rel", "words": ["thereon"]},
116
+		{"language_id": "en", "situation_id": "x08", "type_id": "pos", "reference_id": "att", "words": []},
117
+		{"language_id": "en", "situation_id": "x08", "type_id": "dir", "reference_id": "abs", "words": ["on"]},
118
+		{"language_id": "en", "situation_id": "x08", "type_id": "dir", "reference_id": "rel", "words": ["onto"]},
119
+		{"language_id": "en", "situation_id": "x09", "type_id": "pos", "reference_id": "abs", "words": ["inbetween"]},
120
+		{"language_id": "en", "situation_id": "x09", "type_id": "pos", "reference_id": "rel", "words": ["between"]},
121
+		{"language_id": "en", "situation_id": "x09", "type_id": "pos", "reference_id": "att", "words": ["middle"]},
122
+		{"language_id": "en", "situation_id": "x09", "type_id": "dir", "reference_id": "abs", "words": ["between"]},
123
+		{"language_id": "en", "situation_id": "x09", "type_id": "dir", "reference_id": "rel", "words": ["between"]},
124
+		{"language_id": "de", "situation_id": "x00", "type_id": "pos", "reference_id": "abs", "words": ["vorn(e)"]},
125
+		{"language_id": "de", "situation_id": "x00", "type_id": "pos", "reference_id": "rel", "words": ["vor (+dat.)"]},
126
+		{"language_id": "de", "situation_id": "x00", "type_id": "pos", "reference_id": "att", "words": ["vorder-er/e/es"]},
127
+		{"language_id": "de", "situation_id": "x00", "type_id": "dir", "reference_id": "abs", "words": ["vor","nach vorn"]},
128
+		{"language_id": "de", "situation_id": "x00", "type_id": "dir", "reference_id": "rel", "words": ["vor (+acc.)"]},
129
+		{"language_id": "de", "situation_id": "x01", "type_id": "pos", "reference_id": "abs", "words": ["hinten"]},
130
+		{"language_id": "de", "situation_id": "x01", "type_id": "pos", "reference_id": "rel", "words": ["hinter (+dat.)"]},
131
+		{"language_id": "de", "situation_id": "x01", "type_id": "pos", "reference_id": "att", "words": ["hinter-er/e/es"]},
132
+		{"language_id": "de", "situation_id": "x01", "type_id": "dir", "reference_id": "abs", "words": ["hinter","nach hinten"]},
133
+		{"language_id": "de", "situation_id": "x01", "type_id": "dir", "reference_id": "rel", "words": ["hinter (+acc.)"]},
134
+		{"language_id": "de", "situation_id": "x02", "type_id": "pos", "reference_id": "abs", "words": ["oben"]},
135
+		{"language_id": "de", "situation_id": "x02", "type_id": "pos", "reference_id": "rel", "words": ["über (+dat.)"]},
136
+		{"language_id": "de", "situation_id": "x02", "type_id": "pos", "reference_id": "att", "words": ["ober-er/e/es"]},
137
+		{"language_id": "de", "situation_id": "x02", "type_id": "dir", "reference_id": "abs", "words": ["hoch","nach oben"]},
138
+		{"language_id": "de", "situation_id": "x02", "type_id": "dir", "reference_id": "rel", "words": ["über (+acc.)"]},
139
+		{"language_id": "de", "situation_id": "x03", "type_id": "pos", "reference_id": "abs", "words": ["unten"]},
140
+		{"language_id": "de", "situation_id": "x03", "type_id": "pos", "reference_id": "rel", "words": ["unter (+dat.)"]},
141
+		{"language_id": "de", "situation_id": "x03", "type_id": "pos", "reference_id": "att", "words": ["unter-er/e/es"]},
142
+		{"language_id": "de", "situation_id": "x03", "type_id": "dir", "reference_id": "abs", "words": ["(hin-/her-)unter","nach unten"]},
143
+		{"language_id": "de", "situation_id": "x03", "type_id": "dir", "reference_id": "rel", "words": ["unter (+acc.)"]},
144
+		{"language_id": "de", "situation_id": "x02", "type_id": "pos", "reference_id": "abs", "words": ["links"]},
145
+		{"language_id": "de", "situation_id": "x02", "type_id": "pos", "reference_id": "rel", "words": ["links von (+dat.)"]},
146
+		{"language_id": "de", "situation_id": "x02", "type_id": "pos", "reference_id": "att", "words": ["link-er/e/es"]},
147
+		{"language_id": "de", "situation_id": "x02", "type_id": "dir", "reference_id": "abs", "words": ["nach links"]},
148
+		{"language_id": "de", "situation_id": "x02", "type_id": "dir", "reference_id": "rel", "words": []},
149
+		{"language_id": "de", "situation_id": "x02", "type_id": "pos", "reference_id": "abs", "words": ["rechts"]},
150
+		{"language_id": "de", "situation_id": "x02", "type_id": "pos", "reference_id": "rel", "words": ["rechts von (+dat.)"]},
151
+		{"language_id": "de", "situation_id": "x02", "type_id": "pos", "reference_id": "att", "words": ["recht-er/e/es"]},
152
+		{"language_id": "de", "situation_id": "x02", "type_id": "dir", "reference_id": "abs", "words": ["nach rechts"]},
153
+		{"language_id": "de", "situation_id": "x02", "type_id": "dir", "reference_id": "rel", "words": []}
124 154
 	]
125 155
 }
126 156
 
... ...
@@ -54,7 +54,7 @@
54 54
 		"runic": "'ᚷ'",
55 55
 		"remark": null,
56 56
 		"examples": {
57
-			"fs": "'_g_oa'",
57
+			"fs": "'_g_ud'",
58 58
 			"en": "'_g_olf'",
59 59
 			"de": "'_G_eist'"
60 60
 		}
... ...
@@ -66,7 +66,7 @@
66 66
 		"runic": "'ᚲ'",
67 67
 		"remark": null,
68 68
 		"examples": {
69
-			"fs": "'_k_an'",
69
+			"fs": "'_k_ome'",
70 70
 			"en": "'_k_ilo'",
71 71
 			"de": "'_K_uss'"
72 72
 		}
... ...
@@ -78,7 +78,7 @@
78 78
 		"runic": "'ᛒ'",
79 79
 		"remark": null,
80 80
 		"examples": {
81
-			"fs": "'_b_ua'",
81
+			"fs": "'_b_ue'",
82 82
 			"en": "'_b_ravo'",
83 83
 			"de": "'_B_ahn'"
84 84
 		}
... ...
@@ -90,7 +90,7 @@
90 90
 		"runic": "'ᛈ'",
91 91
 		"remark": null,
92 92
 		"examples": {
93
-			"fs": "'di_p_'",
93
+			"fs": "'ru_p_'",
94 94
 			"en": "'_p_apa'",
95 95
 			"de": "'_P_ark'"
96 96
 		}
... ...
@@ -147,7 +147,7 @@
147 147
 		"type": "fricative",
148 148
 		"ipa": "/s/",
149 149
 		"latin": "'S'/'s'",
150
-		"runic": "'ᛋ'",
150
+		"runic": "'ᛊ'",
151 151
 		"remark": null,
152 152
 		"examples": {
153 153
 			"fs": "'_s_mal'",
154 154
new file mode 100644
... ...
@@ -0,0 +1,15 @@
1
+{
2
+	"de_grot_diktator": {
3
+		"title": "De grot diktator",
4
+		"paragraphs": [
5
+			"Ek bid fur fargiving, dok ek vil nit are de verlds herskar — ek ar nit solk en man. Ek vil nit beherske odar neddrüke et man, insted ek vil helpe de maner alvan and alvar: De judisk, de hejdisk, de fargig, de vit, …. Vi al skal helpe en de ander fur at vi kön leve ine en beter verld. Vi vil nit hate odar farakte us. Dis verld hav plats fur al maner and ur erd ar so rik, at vi al kön spise nok. De levrid kön are so fri and skön; dok vi hav farlatet de veg.",
6
+			"Gridhed hav sükent de maners seler and hav fült de verld med hatrid; hit hav ledet us to elend and blutsketrid. Vi hav utvikelt raskhed, dok ur gester stan stil. Vi lat makiner verke fur us; ur vetrid hav makt us hokmudig and ur klughed hard and unfrendlik; vi denk altu mang and föl altu lit. Dok mer den makiner vi treng manlikhed; mer den klughed vi treng frendlikhed and gudhed. An dis egenheder, ur levrid ar frükridig and al ding ar lost.",
7
+			"Med de helprid av flügtüger and de radio vi ar narer en to de ander den et tid ruk. De manskap treng enhed and en alvar arend bruderlikhed fur tu bruke dis utfindinger gud. Selv no mang tused in der verld kön höre min stem, mang tusend fartvivelt verer, kviner and smal kinder — ofaringer av en sistem, vilk fang and kvel unskuldig maner. Ek rup to al, vilk kön hör mek no: Fartvivel nit! De elend skal farsvinde, van de gridhed farsvind and de biterhed av maner, vilk frük de manskaps forskritrid. De Maners hatrid skal farsvinde and diktarorer skal döe. Dan de kraft, vilk di hav takt fra de folk, skal kome bak to de folk. Selv ef mang blud ar sketet: Tu kempe fur de frihed ar en gud sak.",
8
+			"Kemparer: Kemp nit fur tiraner; maner, vilk farakt ju and mak ju to sklaver; vilk vertskat nit jer levrid, vilk seg to ju, vat je skal make, true and föle! Di skend ju, föd ju, behandel ju lik kanon-föding. Kemp nit fur dis fardervt maner — makin-maner med makin-hövder and makin-herter! Je ar nit makiner, je ar nit direr, je ar maner. Lat de manlikhed blive ine jer herter! Je skal nit hate; bar de unlivt hat, de unlivt and de fardervt.",
9
+			"Kemperar: Kemp nit fur de sklavskap! Kemp fur de frihed! Ine de 17. avsniding av de hajlig Lukas ar skrivt: ‚God ar ine al maner.‘ — nit bar ine en grup av maner, insted ine al maner, ine ju. Je, de folk, hav de kraft; de kraft fur tu bue vapener, dok ok de kraft fur tu sprede gladhed. Je, de folk, hav de kraft fur tu make dis levrid fri and skön, fur tu make dis levrid en vunderfült sak. Darfur: Ine de nam av folkherskrid: Lat us bruke dis kraft! Lat us verde en! Lat us kempe fur en nü verld, fur en beter verld, vilk giv to de maner magrid tu verke, vilk giv en eftertid to de jung and sikerhed to de eld. Ok de tiraner hav truent dis to us fur tu foe de vold, dok di hav lügt. Di mak nit sant dir luving, di vil ni tid. Tiraner frien bar dim selv, dok de folk skal blive sklaver.",
10
+			"Lat us no kempe fur tu upfüle dis luving. Lat us kempe fur tu make de verld fri, fur tu uvervinde landmarker, gridhed, hatrid and de untillatrid. Lat us kempe fur en verld med farstanrid, en verld, var vetridskap and forskritrid skal lede to al mans gladhed.",
11
+			"Kemparer: Ine de nam av folkherskrid: Lat us al verde en!"
12
+		]
13
+	}
14
+}
15
+
0 16
new file mode 100644
... ...
@@ -0,0 +1,81 @@
1
+{
2
+	"data": [
3
+		{"transition_id": "t00", "language_id": "pg", "phonemes": ["-au-"], "examples": ["braudą","raudaz","skauniz","augô","draumaz","baumaz"]},
4
+		{"transition_id": "t00", "language_id": "en", "phonemes": ["-ea-","-e-","-ey-"], "examples": ["bread","red","sheen","eye","dream","beam"]},
5
+		{"transition_id": "t00", "language_id": "af", "phonemes": ["-oo-","-o-"], "examples": ["brood"]},
6
+		{"transition_id": "t00", "language_id": "nl", "phonemes": ["-oo-","-o-"], "examples": ["brood"]},
7
+		{"transition_id": "t00", "language_id": "yi", "phonemes": ["-וי-"], "examples": ["ברויט"]},
8
+		{"transition_id": "t00", "language_id": "de", "phonemes": ["-au-","-o-","-ö-"], "examples": ["Brot","rot","schön","Auge","Traum","Baum"]},
9
+		{"transition_id": "t00", "language_id": "da", "phonemes": ["-ø-"], "examples": ["brød"]},
10
+		{"transition_id": "t00", "language_id": "nb", "phonemes": ["-ø-","-øy-"], "examples": ["brød","rød","skjønn","øye","drøm"]},
11
+		{"transition_id": "t00", "language_id": "sv", "phonemes": ["-ö-"], "examples": ["bröd","röd","skön","dröm"]},
12
+		{"transition_id": "t00", "language_id": "nn", "phonemes": ["-au-"], "examples": ["braud"]},
13
+		{"transition_id": "t00", "language_id": "is", "phonemes": ["-au-"], "examples": ["brauð"]},
14
+		{"transition_id": "t00", "language_id": "fs", "phonemes": ["-ö-"], "examples": ["bröd","röd","skön","ög","dröm"]},
15
+		
16
+		{"transition_id": "t01", "language_id": "pg", "phonemes": ["-ō-"], "examples": ["grōniz","fōljaną"]},
17
+		{"transition_id": "t01", "language_id": "en", "phonemes": ["-ee-"], "examples": ["green","feel"]},
18
+		{"transition_id": "t01", "language_id": "af", "phonemes": ["-oe-"], "examples": ["groen"]},
19
+		{"transition_id": "t01", "language_id": "nl", "phonemes": ["-oe"], "examples": ["groen"]},
20
+		{"transition_id": "t01", "language_id": "yi", "phonemes": ["-ין-"], "examples": ["גרין"]},
21
+		{"transition_id": "t01", "language_id": "de", "phonemes": ["-ü-","-üh-"], "examples": ["grün","fühlen"]},
22
+		{"transition_id": "t01", "language_id": "da", "phonemes": ["-ø-"], "examples": ["grøn"]},
23
+		{"transition_id": "t01", "language_id": "nb", "phonemes": ["-ø-"], "examples": ["grønn"]},
24
+		{"transition_id": "t01", "language_id": "sv", "phonemes": ["-ö-"], "examples": ["grön"]},
25
+		{"transition_id": "t01", "language_id": "nn", "phonemes": ["-ø-"], "examples": ["grøn"]},
26
+		{"transition_id": "t01", "language_id": "is", "phonemes": ["-æ-"], "examples": ["grænn"]},
27
+		{"transition_id": "t01", "language_id": "fs", "phonemes": ["-ö-"], "examples": ["föl","grön"]},
28
+		
29
+		{"transition_id": "t02", "language_id": "pg", "phonemes": ["-eu-"], "examples": ["deupaz","steuraz","leuþa","leuhtą","reukaną","teuhaną","fleuhaną","leuganą"]},
30
+		{"transition_id": "t02", "language_id": "en", "phonemes": ["-ee-","-i-","-ie-"], "examples": ["deep","steer","leed","tee","flee","lie"]},
31
+		{"transition_id": "t02", "language_id": "af", "phonemes": ["-ie-"], "examples": ["diep"]},
32
+		{"transition_id": "t02", "language_id": "nl", "phonemes": ["-ie-","-i-","-ui-","-ij-"], "examples": ["diep"]},
33
+		{"transition_id": "t02", "language_id": "yi", "phonemes": ["-י-"], "examples": ["טיף"]},
34
+		{"transition_id": "t02", "language_id": "de", "phonemes": ["-ie-","-i-","-ü-"], "examples": ["tief","steuern","Lied","Licht","riechen","ziehen","fliehen","lügen"]},
35
+		{"transition_id": "t02", "language_id": "da", "phonemes": ["-y-"], "examples": ["dyb"]},
36
+		{"transition_id": "t02", "language_id": "nb", "phonemes": ["-y-","-ju-"], "examples": ["dyp","styre"]},
37
+		{"transition_id": "t02", "language_id": "sv", "phonemes": ["-ju-","-y-"], "examples": ["djup"]},
38
+		{"transition_id": "t02", "language_id": "is", "phonemes": ["-jú-","-jó-"], "examples": ["djúpur"]},
39
+		{"transition_id": "t02", "language_id": "fs", "phonemes": ["-ü-"], "examples": ["düp","stüre","lüt","rüke","tüe","flüe","lüge"]},
40
+		
41
+		{"transition_id": "t04", "language_id": "pg", "phonemes": ["-iu-"], "examples": ["diurijaz","liudiz","tiugiją"]},
42
+		{"transition_id": "t04", "language_id": "en", "phonemes": ["-ea-","-eu-"], "examples": ["dear","lede","toy"]},
43
+		{"transition_id": "t04", "language_id": "af", "phonemes": [], "examples": []},
44
+		{"transition_id": "t04", "language_id": "nl", "phonemes": ["-uu-","-ie"], "examples": ["duur"]},
45
+		{"transition_id": "t04", "language_id": "yi", "phonemes": [], "examples": []},
46
+		{"transition_id": "t04", "language_id": "de", "phonemes": ["-eu-"], "examples": ["teuer","Zeug","Leute"]},
47
+		{"transition_id": "t04", "language_id": "da", "phonemes": ["-y-"], "examples": ["dyr"]},
48
+		{"transition_id": "t04", "language_id": "nb", "phonemes": ["-y-"], "examples": ["dyr"]},
49
+		{"transition_id": "t04", "language_id": "sv", "phonemes": ["-y-"], "examples": ["dyr"]},
50
+		{"transition_id": "t04", "language_id": "nn", "phonemes": ["-y-"], "examples": ["dyr"]},
51
+		{"transition_id": "t04", "language_id": "is", "phonemes": ["-ý-"], "examples": ["dýr"]},
52
+		{"transition_id": "t04", "language_id": "fs", "phonemes": ["-ü-"], "examples": ["dür","tüg","lüd"]},
53
+		
54
+		{"transition_id": "t05", "language_id": "pg", "phonemes": ["-sk-"], "examples": ["waskaną","skauniz"]},
55
+		{"transition_id": "t05", "language_id": "en", "phonemes": ["-sh-"], "examples": ["wash","sheen"]},
56
+		{"transition_id": "t05", "language_id": "af", "phonemes": [], "examples": ["was"]},
57
+		{"transition_id": "t05", "language_id": "nl", "phonemes": [], "examples": ["wassen"]},
58
+		{"transition_id": "t05", "language_id": "yi", "phonemes": [], "examples": []},
59
+		{"transition_id": "t05", "language_id": "de", "phonemes": ["-sch-"], "examples": ["waschen"]},
60
+		{"transition_id": "t05", "language_id": "da", "phonemes": ["-sk-"], "examples": ["vaske"]},
61
+		{"transition_id": "t05", "language_id": "nb", "phonemes": ["-sk-"], "examples": ["vaske"]},
62
+		{"transition_id": "t05", "language_id": "sv", "phonemes": ["-sk-"], "examples": ["vaska"]},
63
+		{"transition_id": "t05", "language_id": "nn", "phonemes": ["-sk-"], "examples": ["vaske"]},
64
+		{"transition_id": "t05", "language_id": "is", "phonemes": ["-sk-"], "examples": ["vaska"]},
65
+		{"transition_id": "t05", "language_id": "fs", "phonemes": ["-sk-"], "examples": ["vaske"]},
66
+		
67
+		{"transition_id": "t06", "language_id": "pg", "phonemes": ["s-"], "examples": ["swiną"]},
68
+		{"transition_id": "t06", "language_id": "en", "phonemes": ["s-"], "examples": ["swine"]},
69
+		{"transition_id": "t06", "language_id": "af", "phonemes": ["s-"], "examples": ["swyn"]},
70
+		{"transition_id": "t06", "language_id": "nl", "phonemes": ["z-"], "examples": ["zwijn"]},
71
+		{"transition_id": "t06", "language_id": "yi", "phonemes": [], "examples": []},
72
+		{"transition_id": "t06", "language_id": "de", "phonemes": ["sch-"], "examples": ["Schwein"]},
73
+		{"transition_id": "t06", "language_id": "da", "phonemes": ["s-"], "examples": ["svin"]},
74
+		{"transition_id": "t06", "language_id": "nb", "phonemes": ["s-"], "examples": ["svin"]},
75
+		{"transition_id": "t06", "language_id": "sv", "phonemes": ["s-"], "examples": ["svin"]},
76
+		{"transition_id": "t06", "language_id": "nn", "phonemes": ["s-"], "examples": ["svin"]},
77
+		{"transition_id": "t06", "language_id": "is", "phonemes": ["s-"], "examples": ["svínx"]},
78
+		{"transition_id": "t06", "language_id": "fs", "phonemes": ["s-"], "examples": ["svin"]}
79
+	]
80
+}
81
+
... ...
@@ -1,4 +1,78 @@
1 1
 <?php
2
+	function function_feed($value)
3
+	{
4
+		return (
5
+			function ($function) use (&$value)
6
+			{
7
+				return $function($value);
8
+			}
9
+		);
10
+	}
11
+	
12
+	function function_compose($function1, $function2)
13
+	{
14
+		return (
15
+			function ($value) use (&$function1, &$function2)
16
+			{
17
+				return ($function2($function1($value)));
18
+			}
19
+		);
20
+	}
21
+	
22
+	function function_chain($functions)
23
+	{
24
+		return (
25
+			function ($value) use (&$functions)
26
+			{
27
+				/*
28
+				return array_reduce($functions, function ($x, $y) {call_user_func("function_compose", $x, $y);}, $value);
29
+				 */
30
+				return ((count($functions) == 0) ? $value : function_feed($functions[0]($value))(function_chain(array_slice($functions, 1))));
31
+			}
32
+		);
33
+	}
34
+	
35
+	function object_from_array($key_name)
36
+	{
37
+		return (
38
+			function ($list) use (&$key_name)
39
+			{
40
+				$object = [];
41
+				foreach ($list as $element)
42
+				{
43
+					$key = $element[$key_name];
44
+					$object[$key] = $element;
45
+				}
46
+				return $object;
47
+			}
48
+		);
49
+	}
50
+	
51
+	function object_attribute($name)
52
+	{
53
+		return (
54
+			function ($object) use (&$name)
55
+			{
56
+				return $object[$name];
57
+			}
58
+		);
59
+	}
60
+	
61
+	function object_map($function)
62
+	{
63
+		return (
64
+			function ($object) use (&$function)
65
+			{
66
+				$object_ = [];
67
+				foreach ($object as $key => $value)
68
+				{
69
+					$object_[$key] = $function($value);
70
+				}
71
+				return $object_;
72
+			}
73
+		);
74
+	}
75
+	
2 76
 	function fetch($structure, $field, $fallback = null, $escalation = 1)
3 77
 	{
4 78
 		if (array_key_exists($field, $structure))
... ...
@@ -48,10 +122,23 @@
48 122
 	
49 123
 	function mark($core, $classes)
50 124
 	{
125
+		global $configuration;
126
+		if ($configuration["replace_fs_umlauts"])
127
+		{
128
+			if (in_array("lang_fs", $classes) and !in_array("letter", $classes))
129
+			{
130
+				$core = str_replace
131
+				(
132
+					["ö","ü"],
133
+					["oy","uy"],
134
+					$core
135
+				);
136
+			}
137
+		}
51 138
 		return ('<span class="' . implode(" ", $classes) . '">' . $core . '</span>');
52 139
 	}
53 140
 	
54
-	function format($string, $classes = ["word", "lang_fs"])
141
+	function format($string, $classes = ["type_word", "lang_fs"])
55 142
 	{
56 143
 		if ($string == NULL)
57 144
 		{
... ...
@@ -82,7 +169,7 @@
82 169
 		return ((count($words) == 0) ? "?" : implode(", ", array_map(function ($word) use (&$type,&$language) {return mark($word, [$type, "lang_" . $language]);}, $words)));
83 170
 	}
84 171
 	
85
-	function _bar($type = "word")
172
+	function _bar($type = "type_word")
86 173
 	{
87 174
 		return (
88 175
 			function ($value) use (&$type)
... ...
@@ -97,6 +184,42 @@
97 184
 		);
98 185
 	}
99 186
 	
187
+	function format_single($type, $language)
188
+	{
189
+		return (
190
+			function ($piece) use (&$type, &$language)
191
+			{
192
+				return mark($piece, [$type, "lang_" . $language]);
193
+			}
194
+		);
195
+	}
196
+	
197
+	function format_list($type, $language)
198
+	{
199
+		return (
200
+			function ($pieces) use (&$type, &$language)
201
+			{
202
+				return ((count($pieces) == 0) ? "?" : implode(", ", array_map(format_single($type, $language), $pieces)));
203
+			}
204
+		);
205
+	}
206
+	
207
+	function format_correlation($type, $language_from = "fs", $language_to = null)
208
+	{
209
+		global $configuration;
210
+		if ($language_to == null) $language_to = $configuration["target"];
211
+		return (
212
+			function ($source) use (&$type, &$language_from, &$language_to)
213
+			{
214
+				$output = "";
215
+				$output .= format_list($type, $language_from)($source[$language_from]);
216
+				$output .= " ~ ";
217
+				$output .= format_list($type, $language_to)($source[$language_to]);
218
+				return $output;
219
+			}
220
+		);
221
+	}
222
+	
100 223
 	function proposal()
101 224
 	{
102 225
  ?>
... ...
@@ -7,6 +7,7 @@
7 7
 			"de" => "Deutsch",
8 8
 			"eo" => "Esperanto",
9 9
 			"nb" => "Norsk (Bokmål)",
10
-		]
10
+		],
11
+		"replace_fs_umlauts" => false,
11 12
 	];
12 13
 ?>
... ...
@@ -125,36 +125,32 @@ class class_table
125 125
 		$columns_vertical = fetch($configuration, "columns_vertical", null, 2);
126 126
 		$columns_horizontal = fetch($configuration, "columns_horizontal", null, 2);
127 127
 		$columns_data = fetch($configuration, "columns_data", null, 2);
128
+		$data_aggregator = fetch($configuration, "data_aggregator", function ($values) {return /*json_encode(*/$values/*)*/;}, 1);
128 129
 		
129 130
 		$columns_source =
130 131
 		[
131
-			new class_column("Vertical", "vertical"),
132
-			new class_column("Horizontal", "horizontal"),
133
-			new class_column("Data", "data"),
132
+			new class_column("Vertical", "_vertical"),
133
+			new class_column("Horizontal", "_horizontal"),
134
+			new class_column("Data", "_data", function ($x) {return json_encode($x);}),
134 135
 		];
136
+		// gather data for the three columns
135 137
 		$rows_source = null;
136 138
 		{
137
-			$rows_source = $this->rows;
138
-			$rows_source = sql_condense
139
+			$rows_source = array_map
139 140
 			(
140
-				$rows_source,
141
-				array_map(function ($column) {return $column->field;}, $columns_vertical),
142
-				["vertical"],
143
-				["vertical" => function ($values) use (&$columns_vertical) {return implode("/", array_map(function ($column) use (&$values) {return $values[$column->field];}, $columns_vertical));}]
144
-			);
145
-			$rows_source = sql_condense
146
-			(
147
-				$rows_source,
148
-				array_map(function ($column) {return $column->field;}, $columns_horizontal),
149
-				["horizontal"],
150
-				["horizontal" => function ($values) use (&$columns_horizontal) {return implode("/", array_map(function ($column) use (&$values) {return $values[$column->field];}, $columns_horizontal));}]
151
-			);
152
-			$rows_source = sql_condense
153
-			(
154
-				$rows_source,
155
-				array_map(function ($column) {return $column->field;}, $columns_data),
156
-				["data"],
157
-				["data" => function ($values) use (&$configuration) {return fetch($configuration, "data_aggregator", function ($values) {return /*json_encode(*/$values/*)*/;}, 1)($values);}]
141
+				function ($row) use (&$columns_vertical, &$columns_horizontal, &$columns_data, $data_aggregator)
142
+				{
143
+					$raw_vertical = []; foreach ($columns_vertical as $column) array_push($raw_vertical, $column->extract($row));
144
+					$raw_horizontal = []; foreach ($columns_horizontal as $column) array_push($raw_horizontal, $column->extract($row));
145
+					$raw_data = []; foreach ($columns_data as $column) $raw_data[$column->field] = $column->extract($row);
146
+					
147
+					$row_ = [];
148
+					$row_["_vertical"] = implode("/", $raw_vertical);
149
+					$row_["_horizontal"] = implode("/", $raw_horizontal);
150
+					$row_["_data"] = $data_aggregator($raw_data);
151
+					return $row_;
152
+				},
153
+				$this->rows
158 154
 			);
159 155
 		}
160 156
 		// return (new class_table($columns_source, $rows_source));
... ...
@@ -176,6 +172,7 @@ class class_table
176 172
 				)
177 173
 			);
178 174
 		}
175
+		// find groups
179 176
 		$values = [];
180 177
 		foreach ($rows_source as $row)
181 178
 		{
... ...
@@ -201,7 +198,8 @@ class class_table
201 198
 				array_push($values, $value);
202 199
 			}
203 200
 		}
204
-		$groups = sql_groups($rows_source, "vertical");
201
+		$groups = sql_groups($rows_source, "_vertical");
202
+// echo("<!-- " . json_encode($groups, JSON_PRETTY_PRINT) . " -->" . "\n");
205 203
 		$rows_result = array_map
206 204
 		(
207 205
 			function ($group) use (&$columns_vertical,&$columns_horizontal,&$columns_data,&$columns_source,&$columns_result,&$values)
... ...
@@ -164,7 +164,7 @@ a
164 164
 	font-weight: bold;
165 165
 }
166 166
 
167
-.letter
167
+.type_letter
168 168
 {
169 169
 	&.lang_fs
170 170
 	{
... ...
@@ -176,17 +176,30 @@ a
176 176
 		 */
177 177
 	}
178 178
 	
179
-	&.lang_pg,
180
-	&.lang_de,
179
+	&.lang_pg
180
+	{
181
+		text-decoration: underline;
182
+	}
183
+	
181 184
 	&.lang_en,
182
-	&.lang_is,
183
-	&.lang_nb
185
+	&.lang_af,
186
+	&.lang_nl,
187
+	&.lang_de,
188
+	&.lang_da,
189
+	&.lang_nb,
190
+	&.lang_sv,
191
+	&.lang_nn,
192
+	&.lang_is
184 193
 	{
185 194
 		font-style: italic;
186 195
 	}
196
+	
197
+	&.lang_yi
198
+	{
199
+	}
187 200
 }
188 201
 
189
-.word
202
+.type_word
190 203
 {
191 204
 	&.lang_fs
192 205
 	{
... ...
@@ -198,18 +211,34 @@ a
198 211
 		 */
199 212
 	}
200 213
 	
201
-	&.lang_pg,
202
-	&.lang_de,
214
+	&.lang_pg
215
+	{
216
+		text-decoration: underline;
217
+	}
218
+	
203 219
 	&.lang_en,
204
-	&.lang_is,
205
-	&.lang_nb
220
+	&.lang_af,
221
+	&.lang_nl,
222
+	&.lang_de,
223
+	&.lang_da,
224
+	&.lang_nb,
225
+	&.lang_sv,
226
+	&.lang_nn,
227
+	&.lang_is
206 228
 	{
207 229
 		font-style: italic;
208 230
 	}
231
+	
232
+	&.lang_yi
233
+	{
234
+	}
209 235
 }
210 236
 
211
-.sentence
237
+.type_sentence
212 238
 {
239
+	&:before {content: "\"";}
240
+	&:after {content: "\"";}
241
+	
213 242
 	&.lang_fs
214 243
 	{
215 244
 		font-weight: bold;
... ...
@@ -218,24 +247,36 @@ a
218 247
 		font-size: 1.2em;
219 248
 		font-family: runic;
220 249
 		 */
221
-		&:before {content: "\"";}
222
-		&:after {content: "\"";}
223 250
 	}
224 251
 	
225
-	&.lang_pg,
226
-	&.lang_de,
252
+	&.lang_pg
253
+	{
254
+		text-decoration: underline;
255
+	}
256
+	
227 257
 	&.lang_en,
228
-	&.lang_is,
229
-	&.lang_nb
258
+	&.lang_af,
259
+	&.lang_nl,
260
+	&.lang_de,
261
+	&.lang_da,
262
+	&.lang_nb,
263
+	&.lang_sv,
264
+	&.lang_nn,
265
+	&.lang_is
230 266
 	{
231 267
 		font-style: italic;
232
-		&:before {content: "\"";}
233
-		&:after {content: "\"";}
268
+	}
269
+	
270
+	&.lang_yi
271
+	{
234 272
 	}
235 273
 }
236 274
 
237
-.text
275
+.type_text
238 276
 {
277
+	&:before {content: "„";}
278
+	&:after {content: "“";}
279
+	
239 280
 	&.lang_fs
240 281
 	{
241 282
 		font-style: italic;
... ...
@@ -244,19 +285,28 @@ a
244 285
 		font-size: 1.2em;
245 286
 		font-family: runic;
246 287
 		 */
247
-		&:before {content: "„";}
248
-		&:after {content: "“";}
249 288
 	}
250 289
 	
251
-	&.lang_pg,
252
-	&.lang_de,
290
+	&.lang_pg
291
+	{
292
+		text-decoration: underline;
293
+	}
294
+	
253 295
 	&.lang_en,
254
-	&.lang_is,
255
-	&.lang_nb
296
+	&.lang_af,
297
+	&.lang_nl,
298
+	&.lang_de,
299
+	&.lang_da,
300
+	&.lang_nb,
301
+	&.lang_sv,
302
+	&.lang_nn,
303
+	&.lang_is
256 304
 	{
257 305
 		font-style: italic;
258
-		&:before {content: "„";}
259
-		&:after {content: "“";}
306
+	}
307
+	
308
+	&.lang_yi
309
+	{
260 310
 	}
261 311
 }
262 312
 
... ...
@@ -1,905 +1,5110 @@
1
-var __extends = (this && this.__extends) || function (d, b) {
2
-    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
3
-    function __() { this.constructor = d; }
4
-    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
5
-};
6 1
 /*
7
-    
8
-    Build system abstractor "Koralle"
9
-    Copyright (C) 2016	Fenris Wolf (fenris@greenscale.de)
10
-    
2
+	
3
+	Build system abstractor "Koralle"
4
+    Copyright (C) 2016	Fenris Wolf, Christian Neubauer
5
+		(fenris@greenscale.de, neubauer@greenscale.de)
6
+	
11 7
     This program is free software: you can redistribute it and/or modify
12 8
     it under the terms of the GNU General Public License as published by
13 9
     the Free Software Foundation, either version 3 of the License, or
14 10
     (at your option) any later version.
15
-    
11
+	
16 12
     This program is distributed in the hope that it will be useful,
17 13
     but WITHOUT ANY WARRANTY; without even the implied warranty of
18 14
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 15
     GNU General Public License for more details.
20
-    
16
+	
21 17
     You should have received a copy of the GNU General Public License
22 18
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
23 19
        
24 20
 */
25
-var _child_process = require("child_process");
26
-var _fs = require("fs");
27
-var configuration = {};
28
-/**
29
- * @author fenris
30
- */
31
-function indentation(depth, symbol) {
32
-    if (symbol === void 0) { symbol = "\t"; }
33
-    return ((depth == 0) ? "" : (symbol + indentation(depth - 1, symbol)));
21
+
22
+var __extends = (this && this.__extends) || function (d, b) {
23
+    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
24
+    function __() { this.constructor = d; }
25
+    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
26
+};
27
+// module lib_base {
28
+// }
29
+var lib_base;
30
+(function (lib_base) {
31
+    /**
32
+     * @author frac
33
+     */
34
+    function environment() {
35
+        var entries = [
36
+            {
37
+                "id": "web",
38
+                "name": "Web",
39
+                "predicate": function () { return (typeof (document) !== "undefined"); }
40
+            },
41
+            {
42
+                "id": "node",
43
+                "name": "Node.js",
44
+                "predicate": function () { return (typeof (process) !== "undefined"); }
45
+            },
46
+            {
47
+                "id": "rhino",
48
+                "name": "Rhino",
49
+                "predicate": function () { return (typeof (java) !== "undefined"); }
50
+            },
51
+        ];
52
+        var id;
53
+        var found = entries.some(function (entry) {
54
+            if (entry.predicate()) {
55
+                id = entry.id;
56
+                return true;
57
+            }
58
+            else {
59
+                return false;
60
+            }
61
+        });
62
+        if (found) {
63
+            return id;
64
+        }
65
+        else {
66
+            throw (new Error("unknown environment"));
67
+        }
68
+    }
69
+    lib_base.environment = environment;
70
+})(lib_base || (lib_base = {}));
71
+function hash(value) {
72
+    if (typeof (value) === "object") {
73
+        if ("hash" in value)
74
+            return value.hash();
75
+        else
76
+            throw (new Error("[hash]" + " " + "object has no hash-method"));
77
+    }
78
+    else {
79
+        return value.toString();
80
+    }
81
+}
82
+function equals(value_x, value_y) {
83
+    if (typeof (value_x) === "object") {
84
+        if ("equals" in value_x)
85
+            return value_x.equals(value_y);
86
+        else
87
+            throw (new Error("[equals]" + " " + "object has no equals-method"));
88
+    }
89
+    else {
90
+        return (value_x === value_y);
91
+    }
92
+}
93
+function show(value) {
94
+    if (typeof (value) === "object") {
95
+        if ("show" in value)
96
+            return value.show();
97
+        else
98
+            throw (new Error("[show]" + " " + "object has no show-method"));
99
+    }
100
+    else {
101
+        return value.toString();
102
+    }
34 103
 }
35 104
 /**
36
- * @author fenris
105
+ * @author frac
37 106
  */
38
-var class_message = (function () {
107
+var class_observer = (function () {
39 108
     /**
40
-     * @author fenris
109
+     * @author frac
41 110
      */
42
-    function class_message(content, parameters) {
43
-        if (parameters === void 0) { parameters = {}; }
44
-        /**
45
-         * @author fenris
46
-         */
47
-        this.depth = 0;
48
-        if (parameters.prefix == undefined)
49
-            parameters.prefix = null;
50
-        if (parameters.type == undefined)
51
-            parameters.type = null;
52
-        if (parameters.depth == undefined)
53
-            parameters.depth = 0;
54
-        if (parameters.linebreak == undefined)
55
-            parameters.linebreak = false;
56
-        this.content = content;
57
-        this.type = parameters.type;
58
-        this.depth = parameters.depth;
59
-        this.prefix = parameters.prefix;
60
-        this.linebreak = parameters.linebreak;
111
+    function class_observer() {
112
+        this.counter = 0;
113
+        this.actions = {};
114
+        this.buffer = [];
61 115
     }
62 116
     /**
63
-     * @author fenris
117
+     * @author frac
64 118
      */
65
-    class_message.prototype.generate = function (with_type) {
66
-        if (with_type === void 0) { with_type = true; }
67
-        var output = "";
68
-        output += indentation(this.depth);
69
-        if (with_type) {
70
-            if (this.type != null) {
71
-                output += ("[" + this.type + "]" + " ");
72
-            }
73
-        }
74
-        if (this.prefix != null) {
75
-            output += ("<" + this.prefix + ">" + " ");
119
+    class_observer.prototype.empty = function () {
120
+        return (Object.keys(this.actions).length == 0);
121
+    };
122
+    /**
123
+     * @author frac
124
+     */
125
+    class_observer.prototype.flush = function () {
126
+        this.actions = {};
127
+    };
128
+    /**
129
+     * @author frac
130
+     */
131
+    class_observer.prototype.set = function (id, action) {
132
+        this.actions[id] = action;
133
+    };
134
+    /**
135
+     * @author frac
136
+     */
137
+    class_observer.prototype.del = function (id) {
138
+        delete this.actions[id];
139
+    };
140
+    /**
141
+     * @author frac
142
+     */
143
+    class_observer.prototype.add = function (action) {
144
+        this.set((this.counter++).toString(), action);
145
+    };
146
+    /**
147
+     * @author frac
148
+     */
149
+    class_observer.prototype.notify = function (information, delayed) {
150
+        var _this = this;
151
+        if (information === void 0) { information = {}; }
152
+        if (delayed === void 0) { delayed = false; }
153
+        if (delayed) {
154
+            this.buffer.push(information);
76 155
         }
77
-        output += this.content;
78
-        if (this.linebreak) {
79
-            output += "\n";
156
+        else {
157
+            Object.keys(this.actions).forEach(function (id) { return _this.actions[id](information); });
80 158
         }
81
-        return output;
82 159
     };
83 160
     /**
84
-     * @author fenris
161
+     * @author frac
85 162
      */
86
-    class_message.prototype.stdout = function () {
87
-        console.log(this.generate(true));
163
+    class_observer.prototype.rollout = function () {
164
+        var _this = this;
165
+        this.buffer.forEach(function (information) { return _this.notify(information, false); });
166
+        this.buffer = [];
88 167
     };
168
+    return class_observer;
169
+}());
170
+/**
171
+ * @author frac
172
+ */
173
+/*
174
+export interface interface_readable<type_value> {
175
+
176
+    |**
177
+     * @author frac
178
+     *|
179
+    read() : type_executor<type_value, Error>;
180
+
181
+}
182
+ */
183
+/**
184
+ * @author frac
185
+ */
186
+/*
187
+export interface interface_writeable<type_value> {
188
+
189
+    |**
190
+     * @author frac
191
+     *|
192
+    write(value : type_value) : type_executor<void, Error>;
193
+
194
+}
195
+ */
196
+/**
197
+ * @author frac
198
+ */
199
+/*export*/ var class_maybe = (function () {
200
+    function class_maybe() {
201
+    }
89 202
     /**
90
-     * @author fenris
203
+     * @desc whether the wrapper is nothing
204
+     * @author frac
91 205
      */
92
-    class_message.prototype.stderr = function () {
93
-        console.error(this.generate(true));
206
+    class_maybe.prototype.is_nothing = function () {
207
+        throw (new Error("not implemented: class_maybe.is_nothing"));
94 208
     };
95 209
     /**
96
-     * @author fenris
210
+     * @desc whether the wrapper is just
211
+     * @author frac
97 212
      */
98
-    class_message.prototype.console = function () {
99
-        switch (this.type) {
100
-            case "log": {
101
-                console.log(this.generate(false));
102
-                break;
103
-            }
104
-            case "information": {
105
-                console.info(this.generate(false));
106
-                break;
107
-            }
108
-            case "warning": {
109
-                console.warn(this.generate(false));
110
-                break;
111
-            }
112
-            case "error": {
113
-                console.error(this.generate(false));
114
-                break;
115
-            }
116
-            default: {
117
-                throw (new Error("unhandled type '" + this.type + "'"));
118
-            }
119
-        }
213
+    class_maybe.prototype.is_just = function () {
214
+        throw (new Error("not implemented: class_maybe.is_just"));
120 215
     };
121
-    return class_message;
216
+    /**
217
+     * @desc return the value, stored in the maybe-wrapper
218
+     * @author frac
219
+     */
220
+    class_maybe.prototype.cull = function () {
221
+        throw (new Error("not implemented: class_maybe.cull"));
222
+    };
223
+    /**
224
+     * @author frac
225
+     */
226
+    class_maybe.prototype.distinguish = function (action_just, action_nothing) {
227
+        if (action_nothing === void 0) { action_nothing = function () { }; }
228
+        throw (new Error("not implemented: class_maybe.distinguish"));
229
+    };
230
+    /**
231
+     * @author frac
232
+     */
233
+    class_maybe.prototype.propagate = function (action) {
234
+        throw (new Error("not implemented: class_maybe.propagate"));
235
+    };
236
+    return class_maybe;
122 237
 }());
123 238
 /**
124
- * @author fenris
239
+ * @author frac
125 240
  */
126
-var class_cliout = (function () {
127
-    function class_cliout() {
241
+/*export*/ var class_nothing = (function (_super) {
242
+    __extends(class_nothing, _super);
243
+    /**
244
+     * @author frac
245
+     */
246
+    function class_nothing(reason) {
247
+        if (reason === void 0) { reason = null; }
248
+        _super.call(this);
249
+        this.reason = reason;
128 250
     }
129 251
     /**
130
-     * @author fenris
252
+     * @author frac
131 253
      */
132
-    class_cliout.stdout = function (content, depth) {
133
-        if (depth === void 0) { depth = 0; }
134
-        console.log(indentation(depth) + content);
254
+    class_nothing.prototype.is_nothing = function () {
255
+        return true;
135 256
     };
136 257
     /**
137
-     * @author fenris
258
+     * @author frac
138 259
      */
139
-    class_cliout.stderr = function (content, depth) {
140
-        if (depth === void 0) { depth = 0; }
141
-        console.error(indentation(depth) + content);
260
+    class_nothing.prototype.is_just = function () {
261
+        return false;
142 262
     };
143 263
     /**
144
-     * @author fenris
264
+     * @author frac
145 265
      */
146
-    class_cliout.log = function (content, depth) {
147
-        if (depth === void 0) { depth = 0; }
148
-        this.stderr("-- " + content, depth);
266
+    class_nothing.prototype.cull = function () {
267
+        return null;
149 268
     };
150 269
     /**
151
-     * @author fenris
270
+     * @author frac
152 271
      */
153
-    class_cliout.info = function (content, depth) {
154
-        if (depth === void 0) { depth = 0; }
155
-        this.stderr(">> " + content, depth);
272
+    class_nothing.prototype.distinguish = function (action_just, action_nothing) {
273
+        if (action_nothing === void 0) { action_nothing = function () { }; }
274
+        action_nothing(this.reason);
156 275
     };
157 276
     /**
158
-     * @author fenris
277
+     * @author frac
159 278
      */
160
-    class_cliout.warn = function (content, depth) {
161
-        if (depth === void 0) { depth = 0; }
162
-        this.stderr(">> " + content, depth);
279
+    class_nothing.prototype.propagate = function (action) {
280
+        return (new class_nothing(this.reason));
163 281
     };
282
+    return class_nothing;
283
+}(class_maybe));
284
+/**
285
+ * @author frac
286
+ */
287
+/*export*/ var class_just = (function (_super) {
288
+    __extends(class_just, _super);
164 289
     /**
165
-     * @author fenris
290
+     * @author frac
166 291
      */
167
-    class_cliout.error = function (content, depth) {
168
-        if (depth === void 0) { depth = 0; }
169
-        this.stderr(">> " + content, depth);
292
+    function class_just(value) {
293
+        _super.call(this);
294
+        this.value = value;
295
+    }
296
+    /**
297
+     * @author frac