From 0614066c8f913753f7d5eb4df0c4a7bd72c9c81b Mon Sep 17 00:00:00 2001 From: Michał Lenart <michall@ipipan.waw.pl> Date: Tue, 12 Aug 2014 15:36:24 +0000 Subject: [PATCH] - poprawienie testów "shellowych" (doTest.sh - teraz działają) --- doTest.sh | 14 ++++++++------ fsabuilder/morfeusz_builder | 2 +- morfeusz/Environment.cpp | 1 - 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/doTest.sh b/doTest.sh index 147749e..332c025 100755 --- a/doTest.sh +++ b/doTest.sh @@ -7,14 +7,16 @@ DIR=$3 echo "build test FSA for $DIR" -TMP_DICTIONARY=`mktemp` +TMP_DICTIONARY=`mktemp -d` +DICT_NAME=test + python fsabuilder/morfeusz_builder \ - --$WHAT \ + --only-$WHAT \ --input-files $DIR/dictionary.tab \ - -o $TMP_DICTIONARY \ + --dict $DICT_NAME \ + --dict-dir $TMP_DICTIONARY \ --tagset-file=$DIR/tagset.dat \ - --segments-file=$DIR/segmentation.dat \ - --serialization-method=V1 + --segments-file=$DIR/segmentation.dat echo "testing $DIR" @@ -23,7 +25,7 @@ OUTPUT=$DIR/output.txt TMP_OUTPUT=`mktemp` ARGS=`cat $DIR/ARGS` -$CMD -i $TMP_DICTIONARY $ARGS < $INPUT > $TMP_OUTPUT +$CMD --dict-dir $TMP_DICTIONARY --dict $DICT_NAME $ARGS < $INPUT > $TMP_OUTPUT if [ $? -ne 0 ] then diff --git a/fsabuilder/morfeusz_builder b/fsabuilder/morfeusz_builder index 9f82571..d6f40d6 100644 --- a/fsabuilder/morfeusz_builder +++ b/fsabuilder/morfeusz_builder @@ -72,7 +72,7 @@ def _parseOptions(): #~ default=False, #~ action='store_true', #~ help='this option is ignored and exists only for backwards compatibility') - parser.add_option('--dict-name', + parser.add_option('--dict', dest='dictName', help='the name of result dictionary') parser.add_option('--dict-dir', diff --git a/morfeusz/Environment.cpp b/morfeusz/Environment.cpp index 860780b..cc4d403 100644 --- a/morfeusz/Environment.cpp +++ b/morfeusz/Environment.cpp @@ -173,7 +173,6 @@ namespace morfeusz { } void Environment::setDictionary(const std::string& dictName) { - cerr << "SETTING DICT: " << dictName << endl; this->dictionary = DictionariesRepository::instance.getDictionary(dictName, this->processorType); idResolver = dictionary->idResolver; this->idResolver.setCharsetConverter(currentCharsetConverter); -- libgit2 0.22.2