summaryrefslogtreecommitdiff
path: root/python/tests/extractor/run.sh
diff options
context:
space:
mode:
authorChris Dyer <cdyer@Chriss-MacBook-Air.local>2013-01-08 15:45:06 -0500
committerChris Dyer <cdyer@Chriss-MacBook-Air.local>2013-01-08 15:45:06 -0500
commit9cdf67fa00c17f21fa3412948f0d6560dafae1aa (patch)
treee094fe155ec704e393c9ff271a90891b50775074 /python/tests/extractor/run.sh
parent41bc60a856dc2d0bf9659b443c0cd03be8016db7 (diff)
parentd094258e7cb75057af55eca41b65ba74fe3fb2c9 (diff)
don't know
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'python/tests/extractor/run.sh')
-rwxr-xr-xpython/tests/extractor/run.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/python/tests/extractor/run.sh b/python/tests/extractor/run.sh
new file mode 100755
index 00000000..f44da9f8
--- /dev/null
+++ b/python/tests/extractor/run.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+# Make sure that the sa and online extractors are producing the same (correct) output
+
+set -x verbose
+
+python -m cdec.sa.compile -a corpus.al.gz -b corpus.fr-en.gz -o extract >| extract.ini
+
+cat test.in | python -m cdec.sa.extract -c extract.ini -g gold -o 2>&1 | egrep '\[X\].+\|\|\|.+\|\|\|.+\|\|\|.+\|\|\|'|sed -re 's/INFO.+://g' | ./refmt.py | LC_ALL=C sort >| rules.sort
+
+cd gold && cat grammar.0|sed -re 's/Egiv.+(IsSingletonF=)/\1/g'|LC_ALL=C sort >| rules.sort && cd ..
+
+diff gold/rules.sort gold-rules.sort
+diff rules.sort gold-rules.sort