summaryrefslogtreecommitdiff
path: root/derivation_to_json
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2015-09-19 16:24:18 +0200
committerPatrick Simianer <p@simianer.de>2015-09-19 16:24:18 +0200
commit3677425d88fb8743055cf5056fa27f1123100eb4 (patch)
treebd69c84f79919487bff5dabd9b8ae0641e01b382 /derivation_to_json
parent1576f31ff739288dc21c120ab8c04dbe5406cad7 (diff)
misc
Diffstat (limited to 'derivation_to_json')
-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
3 files changed, 3 insertions, 3 deletions
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