1
0
forked from GitHub/gf-rgl

Added tests for pronoun-switch and object ordering in Ger (see tests/object-order.*)

This commit is contained in:
Hans Leiss
2019-07-03 19:16:35 +02:00
parent d3c6dddf2c
commit b521089274
14 changed files with 2552 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
--# Use gf --run < obj-order.gfs or gf> eh object-order.gfs
? echo "loading TestLangGer.gf and TestLangEng.gf ..."
i TestLangGer.gf TestLangEng.gf
-- Remark: examples in examples.eng.txt need only LangEng,LangGer
? echo "parsing from examples.eng and writing trees to examples.eng.new:"
rf -file=examples.eng.txt -lines | p -lang=Eng | l -lang="Eng,Ger" -treebank | wf -file=examples.eng.new
? echo "diff examples.eng.out examples.eng.new"
? diff examples.eng.out examples.eng.new
? echo "parsing from examples.eng and writing source and translation to examples.eng2ger.new:"
rf -file=examples.eng.txt -lines | p -lang=Eng | l -lang="Eng,Ger" | wf -file=examples.eng2ger.new
? echo "diff examples.eng2ger.out examples.eng2ger.new"
? diff examples.eng2ger.out examples.eng2ger.new
? echo "extracting positive, negative and dubious examples from examples.txt ..."
? grep accept examples.txt | sed s/\ --\ [\*a-zA-Z\(\)\ \.\:\,\;\<\>\\_0-4\\+\\?\\-]*// > examples.pos.txt
? grep reject examples.txt | sed s/\ --\ [\*a-zA-Z\(\)\ \.\:\,\;\<\>\\_0-4\\+\\?\\-]*// > examples.neg.txt
? grep dubious examples.txt | sed s/\ --\ [\*a-zA-Z\(\)\ \.\:\,\;\<\>\\_0-4\\+\\?\\-]*// > examples.dub.txt
? echo "parsing negative examples ...; storing trees in examples.neg.new ..."
rf -lines -file="examples.neg.txt" | p -lang=Ger | l -treebank -lang="Ger,Eng" | wf -file="examples.neg.new"
? echo "diff examples.neg.out examples.neg.new:"
? diff examples.neg.out examples.neg.new
? echo "parsing dubious examples ...; storing trees in examples.dub.new ..."
rf -lines -file="examples.dub.txt" | p -lang=Ger | l -treebank -lang="Ger,Eng" | wf -file="examples.dub.new"
? echo "diff examples.dub.out examples.dub.new:"
? diff examples.dub.out examples.dub.new
? echo "parsing positive examples ...; storing trees in examples.pos.new ..."
rf -lines -file="examples.pos.txt" | p -lang=Ger | l -treebank -lang="Ger,Eng" | wf -file="examples.pos.new"
? echo "diff examples.pos.out examples.pos.new:"
? diff examples.pos.out examples.pos.new