Commit 0614066c8f913753f7d5eb4df0c4a7bd72c9c81b

Authored by Michał Lenart
1 parent 5e5f3286

- poprawienie testów "shellowych" (doTest.sh - teraz działają)

git-svn-id: svn://svn.nlp.ipipan.waw.pl/morfeusz/trunk@257 ff4e3ee1-f430-4e82-ade0-24591c43f1fd
doTest.sh
@@ -7,14 +7,16 @@ DIR=$3 @@ -7,14 +7,16 @@ DIR=$3
7 7
8 echo "build test FSA for $DIR" 8 echo "build test FSA for $DIR"
9 9
10 -TMP_DICTIONARY=`mktemp` 10 +TMP_DICTIONARY=`mktemp -d`
  11 +DICT_NAME=test
  12 +
11 python fsabuilder/morfeusz_builder \ 13 python fsabuilder/morfeusz_builder \
12 - --$WHAT \ 14 + --only-$WHAT \
13 --input-files $DIR/dictionary.tab \ 15 --input-files $DIR/dictionary.tab \
14 - -o $TMP_DICTIONARY \ 16 + --dict $DICT_NAME \
  17 + --dict-dir $TMP_DICTIONARY \
15 --tagset-file=$DIR/tagset.dat \ 18 --tagset-file=$DIR/tagset.dat \
16 - --segments-file=$DIR/segmentation.dat \  
17 - --serialization-method=V1 19 + --segments-file=$DIR/segmentation.dat
18 20
19 echo "testing $DIR" 21 echo "testing $DIR"
20 22
@@ -23,7 +25,7 @@ OUTPUT=$DIR/output.txt @@ -23,7 +25,7 @@ OUTPUT=$DIR/output.txt
23 TMP_OUTPUT=`mktemp` 25 TMP_OUTPUT=`mktemp`
24 ARGS=`cat $DIR/ARGS` 26 ARGS=`cat $DIR/ARGS`
25 27
26 -$CMD -i $TMP_DICTIONARY $ARGS < $INPUT > $TMP_OUTPUT 28 +$CMD --dict-dir $TMP_DICTIONARY --dict $DICT_NAME $ARGS < $INPUT > $TMP_OUTPUT
27 29
28 if [ $? -ne 0 ] 30 if [ $? -ne 0 ]
29 then 31 then
fsabuilder/morfeusz_builder
@@ -72,7 +72,7 @@ def _parseOptions(): @@ -72,7 +72,7 @@ def _parseOptions():
72 #~ default=False, 72 #~ default=False,
73 #~ action='store_true', 73 #~ action='store_true',
74 #~ help='this option is ignored and exists only for backwards compatibility') 74 #~ help='this option is ignored and exists only for backwards compatibility')
75 - parser.add_option('--dict-name', 75 + parser.add_option('--dict',
76 dest='dictName', 76 dest='dictName',
77 help='the name of result dictionary') 77 help='the name of result dictionary')
78 parser.add_option('--dict-dir', 78 parser.add_option('--dict-dir',
morfeusz/Environment.cpp
@@ -173,7 +173,6 @@ namespace morfeusz { @@ -173,7 +173,6 @@ namespace morfeusz {
173 } 173 }
174 174
175 void Environment::setDictionary(const std::string& dictName) { 175 void Environment::setDictionary(const std::string& dictName) {
176 - cerr << "SETTING DICT: " << dictName << endl;  
177 this->dictionary = DictionariesRepository::instance.getDictionary(dictName, this->processorType); 176 this->dictionary = DictionariesRepository::instance.getDictionary(dictName, this->processorType);
178 idResolver = dictionary->idResolver; 177 idResolver = dictionary->idResolver;
179 this->idResolver.setCharsetConverter(currentCharsetConverter); 178 this->idResolver.setCharsetConverter(currentCharsetConverter);