b3c1b9b9b5219c8d1fd837258eb5789f57ded463
fenris foo

fenris authored 8 years ago

source/structure/correlatives.html.php   1) <?php
source/structure/correlatives.html.php   2) 	include_once("source/logic/server/data.php");
source/structure/correlatives.html.php   3) 	include_once("source/logic/server/table.php");
bfadmin-master advanced

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php   4) 	include_once("source/logic/server/misc.php");
bfadmin-master fancy table-stuff, woohoo!

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php   5) 	include_once("source/logic/server/sql.php");
fenris foo

fenris authored 8 years ago

source/structure/correlatives.html.php   6)  ?>
bfadmin-master advanced

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php   7) <section class="subsection" id="correlatives">
Fenris Wolf advanced

Fenris Wolf authored 8 years ago

source/structure/correlatives.html.php   8) 	<header>Correlatives</header>
Christian Fraß personal pronouns and infin...

Christian Fraß authored 8 years ago

source/content/correlatives.html.php     9) 	<?php proposal(); ?>
fenris foo

fenris authored 8 years ago

source/structure/correlatives.html.php  10) <?php
Christian Fraß added some drafts and an ex...

Christian Fraß authored 8 years ago

source/content/correlatives.html.php    11) 	$mode = 0;
bfadmin-master fancy table-stuff, woohoo!

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php  12) 	switch ($mode)
bfadmin-master advanced

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php  13) 	{
bfadmin-master fancy table-stuff, woohoo!

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php  14) 		case 0:
source/structure/correlatives.html.php  15) 		{
source/structure/correlatives.html.php  16) 			$table = new class_table
fenris foo

fenris authored 8 years ago

source/structure/correlatives.html.php  17) 			(
bfadmin-master fancy table-stuff, woohoo!

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php  18) 				[
source/structure/correlatives.html.php  19) 					new class_column
source/structure/correlatives.html.php  20) 					(
source/structure/correlatives.html.php  21) 						"Domain",
source/structure/correlatives.html.php  22) 						function ($row) {return $row["domain"];}
source/structure/correlatives.html.php  23) 					),
source/structure/correlatives.html.php  24) 					new class_column
source/structure/correlatives.html.php  25) 					(
source/structure/correlatives.html.php  26) 						"Interrogative / Relative",
source/structure/correlatives.html.php  27) 						_foo("interrogative"),
source/structure/correlatives.html.php  28) 						_bar("word")
source/structure/correlatives.html.php  29) 					),
source/structure/correlatives.html.php  30) 					new class_column
source/structure/correlatives.html.php  31) 					(
source/structure/correlatives.html.php  32) 						"Demonstrative far",
source/structure/correlatives.html.php  33) 						_foo("demonstrative_far"),
source/structure/correlatives.html.php  34) 						_bar("word")
source/structure/correlatives.html.php  35) 					),
source/structure/correlatives.html.php  36) 					new class_column
source/structure/correlatives.html.php  37) 					(
source/structure/correlatives.html.php  38) 						"Demonstrative near",
source/structure/correlatives.html.php  39) 						_foo("demonstrative_near"),
source/structure/correlatives.html.php  40) 						_bar("word")
source/structure/correlatives.html.php  41) 					),
source/structure/correlatives.html.php  42) 					new class_column
source/structure/correlatives.html.php  43) 					(
source/structure/correlatives.html.php  44) 						"Universal",
source/structure/correlatives.html.php  45) 						_foo("universal"),
source/structure/correlatives.html.php  46) 						_bar("word")
source/structure/correlatives.html.php  47) 					),
source/structure/correlatives.html.php  48) 					new class_column
source/structure/correlatives.html.php  49) 					(
source/structure/correlatives.html.php  50) 						"Undefined",
source/structure/correlatives.html.php  51) 						_foo("undefined"),
source/structure/correlatives.html.php  52) 						_bar("word")
source/structure/correlatives.html.php  53) 					),
source/structure/correlatives.html.php  54) 					new class_column
source/structure/correlatives.html.php  55) 					(
source/structure/correlatives.html.php  56) 						"Negative",
source/structure/correlatives.html.php  57) 						_foo("negative"),
source/structure/correlatives.html.php  58) 						_bar("word")
source/structure/correlatives.html.php  59) 					),
source/structure/correlatives.html.php  60) 				],
source/structure/correlatives.html.php  61) 				read_json("source/data/correlatives.json")
source/structure/correlatives.html.php  62) 			);
source/structure/correlatives.html.php  63) 			$table->generate();
source/structure/correlatives.html.php  64) 			break;
source/structure/correlatives.html.php  65) 		}
source/structure/correlatives.html.php  66) 		case 1:
source/structure/correlatives.html.php  67) 		{
source/structure/correlatives.html.php  68) 			global $configuration;
source/structure/correlatives.html.php  69) 			$database = read_json("source/data/x.json");
source/structure/correlatives.html.php  70) 			$data = $database["words"];
source/structure/correlatives.html.php  71) 			// $data = sql_cross($database["words"], sql_rename($database["words"]));
source/structure/correlatives.html.php  72) 			$data = sql_select($data, function ($row) {return ($row["language"] == "fs");});
source/structure/correlatives.html.php  73) 			$table = new class_table
fenris foo

fenris authored 8 years ago

source/structure/correlatives.html.php  74) 			(
bfadmin-master fancy table-stuff, woohoo!

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php  75) 				[
source/structure/correlatives.html.php  76) 					new class_column("Domain (id)", function ($row) {return $row["domain_id"];}),
source/structure/correlatives.html.php  77) 					new class_column("Type (id)", function ($row) {return $row["type_id"];}),
source/structure/correlatives.html.php  78) 					new class_column
source/structure/correlatives.html.php  79) 					(
source/structure/correlatives.html.php  80) 						"Folksprak",
source/structure/correlatives.html.php  81) 						function ($row) {return $row["words"];},
source/structure/correlatives.html.php  82) 						function ($value) {global $configuration; return _baz($value, "word", "fs");}
source/structure/correlatives.html.php  83) 					),
source/structure/correlatives.html.php  84) 					/*
source/structure/correlatives.html.php  85) 					new class_column
source/structure/correlatives.html.php  86) 					(
source/structure/correlatives.html.php  87) 						$configuration["languagemap"][$configuration["target"]],
source/structure/correlatives.html.php  88) 						function ($row) {global $configuration; return $row["words"][$configuration["target"]];},
source/structure/correlatives.html.php  89) 						function ($value) {global $configuration; return _baz($value, "word", $configuration["target"]);}
source/structure/correlatives.html.php  90) 					),
source/structure/correlatives.html.php  91) 					 */
source/structure/correlatives.html.php  92) 				],
source/structure/correlatives.html.php  93) 				$data
source/structure/correlatives.html.php  94) 			);
source/structure/correlatives.html.php  95) 			$table->generate();
source/structure/correlatives.html.php  96) 			break;
source/structure/correlatives.html.php  97) 		}
source/structure/correlatives.html.php  98) 		case 2:
source/structure/correlatives.html.php  99) 		{
source/structure/correlatives.html.php 100) 			global $configuration;
source/structure/correlatives.html.php 101) 			$database = read_json("source/data/x.json");
source/structure/correlatives.html.php 102) 			$data = $database["words"];
bfadmin-master minor changes

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php 103) 			
source/structure/correlatives.html.php 104) 			// get domain names
source/structure/correlatives.html.php 105) 			{
source/structure/correlatives.html.php 106) 				$data = sql_cross($data, $database["domains"]);
source/structure/correlatives.html.php 107) 				$data = sql_rename($data, "name", "domain_name");
source/structure/correlatives.html.php 108) 				$data = sql_select($data, function ($row) {return ($row["id"] == $row["domain_id"]);});
source/structure/correlatives.html.php 109) 				$data = sql_delete($data, ["id"]);
source/structure/correlatives.html.php 110) 			}
source/structure/correlatives.html.php 111) 			
source/structure/correlatives.html.php 112) 			// get type names
source/structure/correlatives.html.php 113) 			{
source/structure/correlatives.html.php 114) 				$data = sql_cross($data, $database["types"]);
source/structure/correlatives.html.php 115) 				$data = sql_rename($data, "name", "type_name");
source/structure/correlatives.html.php 116) 				$data = sql_select($data, function ($row) {return ($row["id"] == $row["type_id"]);});
source/structure/correlatives.html.php 117) 				$data = sql_delete($data, ["id"]);
source/structure/correlatives.html.php 118) 			}
source/structure/correlatives.html.php 119) 			
source/structure/correlatives.html.php 120) 			// transform
source/structure/correlatives.html.php 121) 			{
source/structure/correlatives.html.php 122) 				$data = sql_select($data, function ($row) {global $configuration; return (($row["language"] == "fs") or ($row["language"] == $configuration["target"]));});
source/structure/correlatives.html.php 123) 				// $data = sql_group($data, "language");
source/structure/correlatives.html.php 124) 				$data = sql_add($data, ["type_name/words"], ["type_name/words" => function ($row) {return ["key" => $row["type_id"], "value" => [$row["language"] => $row["words"]]];}]);
source/structure/correlatives.html.php 125) 				$data = sql_project($data, ["domain_name", "type_name/words"]);
source/structure/correlatives.html.php 126) 				$data = sql_group
bfadmin-master fancy table-stuff, woohoo!

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php 127) 				(
source/structure/correlatives.html.php 128) 					$data,
source/structure/correlatives.html.php 129) 					"domain_name",
source/structure/correlatives.html.php 130) 					[
source/structure/correlatives.html.php 131) 						"type_name/words" => function ($args)
source/structure/correlatives.html.php 132) 						{
source/structure/correlatives.html.php 133) 							$output = [];
bfadmin-master minor changes

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php 134) 							foreach ($args as $arg)
source/structure/correlatives.html.php 135) 							{
source/structure/correlatives.html.php 136) 								if (! array_key_exists($arg["key"], $output)) $output[$arg["key"]] = [];
source/structure/correlatives.html.php 137) 								foreach ($arg["value"] as $key => $value)
bfadmin-master fancy table-stuff, woohoo!

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php 138) 								{
bfadmin-master minor changes

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php 139) 									$output[$arg["key"]][$key] = $value;
source/structure/correlatives.html.php 140) 								}
source/structure/correlatives.html.php 141) 							}
bfadmin-master fancy table-stuff, woohoo!

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php 142) 							return $output;
source/structure/correlatives.html.php 143) 						},
source/structure/correlatives.html.php 144) 					]
bfadmin-master minor changes

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php 145) 				);
source/structure/correlatives.html.php 146) 			}
source/structure/correlatives.html.php 147) 			
bfadmin-master fancy table-stuff, woohoo!

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php 148) 			$table = new class_table
fenris foo

fenris authored 8 years ago

source/structure/correlatives.html.php 149) 			(
bfadmin-master fancy table-stuff, woohoo!

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php 150) 				array_merge
source/structure/correlatives.html.php 151) 				(
source/structure/correlatives.html.php 152) 					[
source/structure/correlatives.html.php 153) 						new class_column("Domain", function ($row) {return $row["domain_name"];}),
bfadmin-master minor changes

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php 154) 						// new class_column("type_name/words", function ($row) {return $row["type_name/words"];}, function ($value) {print_r($value);}),
bfadmin-master fancy table-stuff, woohoo!

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php 155) 					],
source/structure/correlatives.html.php 156) 					array_map
source/structure/correlatives.html.php 157) 					(
source/structure/correlatives.html.php 158) 						function ($type)
source/structure/correlatives.html.php 159) 						{
source/structure/correlatives.html.php 160) 							return (
source/structure/correlatives.html.php 161) 								new class_column
source/structure/correlatives.html.php 162) 								(
source/structure/correlatives.html.php 163) 									("Type: " . $type["name"]),
bfadmin-master minor changes

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php 164) 									function ($row) use (&$type)
source/structure/correlatives.html.php 165) 									{
source/structure/correlatives.html.php 166) 										global $configuration;
source/structure/correlatives.html.php 167) 										return ["original" => $row["type_name/words"][$type["id"]]["fs"], "translated" => $row["type_name/words"][$type["id"]][$configuration["target"]]];
source/structure/correlatives.html.php 168) 									},
source/structure/correlatives.html.php 169) 									_bar("word")
bfadmin-master fancy table-stuff, woohoo!

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php 170) 								)
source/structure/correlatives.html.php 171) 							);
source/structure/correlatives.html.php 172) 						},
bfadmin-master minor changes

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php 173) 						array_filter($database["types"], function ($type) {return ($type["id"] != "relative");})
bfadmin-master fancy table-stuff, woohoo!

bfadmin-master authored 8 years ago

source/structure/correlatives.html.php 174) 					)
source/structure/correlatives.html.php 175) 				),
source/structure/correlatives.html.php 176) 				$data
source/structure/correlatives.html.php 177) 			);
source/structure/correlatives.html.php 178) 			$table->generate();
source/structure/correlatives.html.php 179) 			break;
source/structure/correlatives.html.php 180) 		}
source/structure/correlatives.html.php 181) 		default:
source/structure/correlatives.html.php 182) 		{
source/structure/correlatives.html.php 183) 			break;
source/structure/correlatives.html.php 184) 		}
source/structure/correlatives.html.php 185) 	}
fenris foo

fenris authored 8 years ago

source/structure/correlatives.html.php 186)  ?>
source/structure/correlatives.html.php 187) <div class="note_information">Some of these words are very unlikely to ever get used (e.g. <span class="word lang_fs">ing slag</span>). Nevertheless they exist and are listed for completeness.</div>