270847a5a6badc57411c713b4d8646dc4d18a577
bfadmin-master advanced

bfadmin-master authored 8 years ago

source/structure/declension.html.php   1) <section class="section" id="declension">
bfadmin-master advanced

bfadmin-master authored 8 years ago

source/structure/declension.html.php   2) 	<header>Declension</header>
Christian Fraß added some drafts and an ex...

Christian Fraß authored 8 years ago

source/content/declension.html.php     3) <?php
source/content/declension.html.php     4) 	compose
source/content/declension.html.php     5) 	(
source/content/declension.html.php     6) 		[
source/content/declension.html.php     7) 			"numeri",
source/content/declension.html.php     8) 			"cases",
source/content/declension.html.php     9) 			"definiteness",
source/content/declension.html.php    10) 		]
source/content/declension.html.php    11) 	);
source/content/declension.html.php    12)  ?>
source/content/declension.html.php    13) <p>The following table summarizes the information of this section:</p>
source/content/declension.html.php    14) <?php
Christian Fraß included developer-notes; a...

Christian Fraß authored 8 years ago

source/content/declension.html.php    15) 	$data_common = read_json("source/data/common.json");
source/content/declension.html.php    16) 	$data_declension = read_json("source/data/declension.json");
source/content/declension.html.php    17) 	
source/content/declension.html.php    18) 	$data = $data_declension["words"];
source/content/declension.html.php    19) 	{
source/content/declension.html.php    20) 		{
source/content/declension.html.php    21) 			if (true)
source/content/declension.html.php    22) 			{
source/content/declension.html.php    23) 				$data = sql_cross($data, $data_common["counts"]);
source/content/declension.html.php    24) 				$data = sql_select($data, function ($row) {return ($row["count_id"] == $row["id"]);});
source/content/declension.html.php    25) 				$data = sql_delete($data, ["count_id", "id"]);
source/content/declension.html.php    26) 				$data = sql_rename($data, "name", "count_name");
source/content/declension.html.php    27) 			}
source/content/declension.html.php    28) 			else
source/content/declension.html.php    29) 			{
source/content/declension.html.php    30) 				$data = sql_rename($data, "count_id", "count_name");
source/content/declension.html.php    31) 			}
source/content/declension.html.php    32) 		}
source/content/declension.html.php    33) 		{
source/content/declension.html.php    34) 			if (true)
source/content/declension.html.php    35) 			{
source/content/declension.html.php    36) 				$data = sql_cross($data, $data_common["definitenesses"]);
source/content/declension.html.php    37) 				$data = sql_select($data, function ($row) {return ($row["definiteness_id"] == $row["id"]);});
source/content/declension.html.php    38) 				$data = sql_delete($data, ["definiteness_id", "id"]);
source/content/declension.html.php    39) 				$data = sql_rename($data, "name", "definiteness_name");
source/content/declension.html.php    40) 			}
source/content/declension.html.php    41) 			else
source/content/declension.html.php    42) 			{
source/content/declension.html.php    43) 				$data = sql_rename($data, "definiteness_id", "definiteness_name");
source/content/declension.html.php    44) 			}
source/content/declension.html.php    45) 		}
source/content/declension.html.php    46) 		{
source/content/declension.html.php    47) 			if (true)
source/content/declension.html.php    48) 			{
source/content/declension.html.php    49) 				$data = sql_cross($data, $data_common["cases"]);
source/content/declension.html.php    50) 				$data = sql_select($data, function ($row) {return ($row["case_id"] == $row["id"]);});
source/content/declension.html.php    51) 				$data = sql_delete($data, ["case_id", "id"]);
source/content/declension.html.php    52) 				$data = sql_rename($data, "name", "case_name");
source/content/declension.html.php    53) 			}
source/content/declension.html.php    54) 			else
source/content/declension.html.php    55) 			{
source/content/declension.html.php    56) 				$data = sql_rename($data, "case_id", "case_name");
source/content/declension.html.php    57) 			}
source/content/declension.html.php    58) 		}
source/content/declension.html.php    59) 	}
source/content/declension.html.php    60) 	
source/content/declension.html.php    61) 	$table = new class_table
source/content/declension.html.php    62) 	(
source/content/declension.html.php    63) 		[
source/content/declension.html.php    64) 			new class_column("Language", "language_id"),
source/content/declension.html.php    65) 			new class_column("Count", "count_name"),
source/content/declension.html.php    66) 			new class_column("Definiteness", "definiteness_name"),
source/content/declension.html.php    67) 			new class_column("Case", "case_name"),
source/content/declension.html.php    68) 			new class_column("Words", "words", function ($x) {return json_encode($x);}),
source/content/declension.html.php    69) 		],
source/content/declension.html.php    70) 		$data
source/content/declension.html.php    71) 	);
source/content/declension.html.php    72) 	
source/content/declension.html.php    73) 	$table->snap
source/content/declension.html.php    74) 	(
source/content/declension.html.php    75) 		[
source/content/declension.html.php    76) 			"label_vertical" => function ($column) {return "";},
source/content/declension.html.php    77) 			"columns_vertical" =>
source/content/declension.html.php    78) 			[
source/content/declension.html.php    79) 				$table->columns_get()[1],
source/content/declension.html.php    80) 				$table->columns_get()[2],
source/content/declension.html.php    81) 			],
source/content/declension.html.php    82) 			"label_horizontal" => function ($column, $value) {return $value;},
source/content/declension.html.php    83) 			"columns_horizontal" =>
source/content/declension.html.php    84) 			[
source/content/declension.html.php    85) 				$table->columns_get()[3],
source/content/declension.html.php    86) 			],
source/content/declension.html.php    87) 			"columns_data" =>
source/content/declension.html.php    88) 			[
source/content/declension.html.php    89) 				$table->columns_get()[0],
source/content/declension.html.php    90) 				$table->columns_get()[4],
source/content/declension.html.php    91) 			],
source/content/declension.html.php    92) 			"data_aggregator" => function ($values)
source/content/declension.html.php    93) 			{
source/content/declension.html.php    94) 				return $values;
source/content/declension.html.php    95) 			},
source/content/declension.html.php    96) 			"data_formatter" => function ($value)
source/content/declension.html.php    97) 			{
source/content/declension.html.php    98) 				switch (1)
source/content/declension.html.php    99) 				{
source/content/declension.html.php   100) 					case 0:
source/content/declension.html.php   101) 					{
Christian Fraß update

Christian Fraß authored 7 years ago

source/content/declension.html.php   102) 						return format_list("type_word", "flk")($value[0]["words"]);
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/declension.html.php   103) 						break;
Christian Fraß included developer-notes; a...

Christian Fraß authored 8 years ago

source/content/declension.html.php   104) 					}
source/content/declension.html.php   105) 					case 1:
source/content/declension.html.php   106) 					{
source/content/declension.html.php   107) 						global $configuration;
source/content/declension.html.php   108) 						$value_ = [];
Christian Fraß update

Christian Fraß authored 7 years ago

source/content/declension.html.php   109) 						foreach (["flk",$configuration["target"]] as $language_id)
Christian Fraß included developer-notes; a...

Christian Fraß authored 8 years ago

source/content/declension.html.php   110) 						{
source/content/declension.html.php   111) 							$value_[$language_id] = array_reduce
source/content/declension.html.php   112) 							(
source/content/declension.html.php   113) 								array_map
source/content/declension.html.php   114) 								(
source/content/declension.html.php   115) 									function ($dataset) {return $dataset["words"];},
source/content/declension.html.php   116) 									array_filter($value, function ($dataset) use (&$language_id) {return ($dataset["language_id"] == $language_id);})
source/content/declension.html.php   117) 								),
source/content/declension.html.php   118) 								function ($x, $y) {return array_merge($x, $y);},
source/content/declension.html.php   119) 								[]
source/content/declension.html.php   120) 							);
source/content/declension.html.php   121) 						}
source/content/declension.html.php   122) 						return (
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/declension.html.php   123) 							format_correlation("type_word")
Christian Fraß included developer-notes; a...

Christian Fraß authored 8 years ago

source/content/declension.html.php   124) 							(
source/content/declension.html.php   125) 								[
Christian Fraß update

Christian Fraß authored 7 years ago

source/content/declension.html.php   126) 									"flk" => $value_["flk"],
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/declension.html.php   127) 									$configuration["target"] => $value_[$configuration["target"]],
Christian Fraß included developer-notes; a...

Christian Fraß authored 8 years ago

source/content/declension.html.php   128) 								]
source/content/declension.html.php   129) 							)
source/content/declension.html.php   130) 						);
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/declension.html.php   131) 						break;
Christian Fraß included developer-notes; a...

Christian Fraß authored 8 years ago

source/content/declension.html.php   132) 					}
source/content/declension.html.php   133) 					default:
source/content/declension.html.php   134) 					{
source/content/declension.html.php   135) 						return json_encode($value);
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/declension.html.php   136) 						break;
Christian Fraß included developer-notes; a...

Christian Fraß authored 8 years ago

source/content/declension.html.php   137) 					}
source/content/declension.html.php   138) 				}
source/content/declension.html.php   139) 			},
source/content/declension.html.php   140) 		]
source/content/declension.html.php   141) 	)->generate();
Christian Fraß added transition-data and t...

Christian Fraß authored 8 years ago

source/content/declension.html.php   142)  ?>
Christian Fraß update

Christian Fraß authored 7 years ago

source/content/declension.html.php   143) <p><?php echo(format_correlation("type_sentence")(["flk" => ["Vi kön see de huses vindöger"], "eng" => ["We can see the houses windows."]])); ?></p></section>