summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rwxr-xr-xderivation_to_json/derivation_to_json.rb (renamed from derivation_to_json/deriv.rb)4
-rw-r--r--derivation_to_json/example.json2
-rw-r--r--derivation_to_json/example.raw (renamed from derivation_to_json/example)0
4 files changed, 4 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index d306650..0d5cbd8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*.out
*.err
out.*
+derivation_editor/
util/run_beta_test
diff --git a/derivation_to_json/deriv.rb b/derivation_to_json/derivation_to_json.rb
index e6230c3..a5ef2ef 100755
--- a/derivation_to_json/deriv.rb
+++ b/derivation_to_json/derivation_to_json.rb
@@ -141,8 +141,8 @@ source_rgroups.each { |i|
h = {}
h[:phrase_alignment] = phrase_align
-h[:source_groups] = source_groups.map { |a| a.map { |i| i.first } }
-h[:target_groups] = groups.map { |a| a.map { |i| i.first } }
+h[:source_groups] = source_groups.map { |a| a.map { |i| i.first }.join " " }
+h[:target_groups] = groups.map { |a| a.map { |i| i.first }.join " " }
return h.to_json
end
diff --git a/derivation_to_json/example.json b/derivation_to_json/example.json
index b84edad..6bb2b19 100644
--- a/derivation_to_json/example.json
+++ b/derivation_to_json/example.json
@@ -1 +1 @@
-{"phrase_alignment":[[0,2],[1],[0,2],[3],[4],[5],[6],[7,9],[8],[7,9],[10,18],[11],[10,18],[12],[13],[14],[15],[16],[17],[10,18],[19],[20],[21,23],[22],[21,23],[24],[25]],"source_groups":[["hier","also"],["ein","bescheidener"],[","],["auf","alle"],["demokratien"],["anzuwendender"],["vorschlag"],[":"],["der","markt","für"],["ideen"],["funktioniert"],["besser"],[","],["wenn","es","den"],["bürgern"],["leichter"],["fällt",",","die"],["zielkonflikte","zwischen"],["treffsicherheit"],["der"],["aussagen","und"],["unterhaltung"],["oder","zwischen"],["treffsicherheit"],["und"],["parteitreue"],["zu","erkennen","."]],"target_groups":[["so","here"],["a","modest"],[","],["to","all"],["democracies"],["anzuwendender"],["proposal"],[":"],["the","market","for"],["ideas"],["works"],["better"],["if"],["citizens"],["easier"],[",","the"],["trade","@-@","offs","between"],["treffsicherheit"],["the"],["statements","and"],["entertainment"],["or"],["treffsicherheit"],["and"],["parteitreue"],["."]]}
+{"phrase_alignment":[[0,2],[1],[0,2],[3],[4],[5],[6],[7,9],[8],[7,9],[10,18],[11],[10,18],[12],[13],[14],[15],[16],[17],[10,18],[19],[20],[21,23],[22],[21,23],[24],[25]],"source_groups":["hier also","ein bescheidener",",","auf alle","demokratien","anzuwendender","vorschlag",":","der markt für","ideen","funktioniert","besser",",","wenn es den","bürgern","leichter","fällt , die","zielkonflikte zwischen","treffsicherheit","der","aussagen und","unterhaltung","oder zwischen","treffsicherheit","und","parteitreue","zu erkennen ."],"target_groups":["so here","a modest",",","to all","democracies","anzuwendender","proposal",":","the market for","ideas","works","better","if","citizens","easier",", the","trade @-@ offs between","treffsicherheit","the","statements and","entertainment","or","treffsicherheit","and","parteitreue","."]}
diff --git a/derivation_to_json/example b/derivation_to_json/example.raw
index 5128e09..5128e09 100644
--- a/derivation_to_json/example
+++ b/derivation_to_json/example.raw