diff options
author | Paul Baltescu <pauldb89@gmail.com> | 2013-02-21 14:13:55 +0000 |
---|---|---|
committer | Paul Baltescu <pauldb89@gmail.com> | 2013-02-21 14:13:55 +0000 |
commit | b5491898549c61bd799d199aa9178a8394a1ef69 (patch) | |
tree | fb2686a2aae03ff07bcdf4cd47e8c3191eff8d1e /python/tests/extractor/run.sh | |
parent | 0187447a643c3ea262b13b3052cb1531990eafe6 (diff) | |
parent | c17d9c23d023a5c08656376944f636180f0a437b (diff) |
Merge branch 'master' of https://github.com/pauldb89/cdec
Diffstat (limited to 'python/tests/extractor/run.sh')
-rwxr-xr-x | python/tests/extractor/run.sh | 14 |
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 |