diff options
author | Wilker Aziz <wilker.aziz@gmail.com> | 2013-06-24 18:38:10 +0400 |
---|---|---|
committer | Wilker Aziz <wilker.aziz@gmail.com> | 2013-06-24 18:38:10 +0400 |
commit | 2c19238c2401a851f1054b512a34f5239f3cd085 (patch) | |
tree | fcf486c3b491a2be1ad7dfc8ed3c93e4f584d95f /scripts/training | |
parent | b49e6a162fd1df7013d30ee906ab45f6ef535254 (diff) |
Patching up the suffix array wrappers
Diffstat (limited to 'scripts/training')
3 files changed, 7 insertions, 6 deletions
diff --git a/scripts/training/train-model.perl b/scripts/training/train-model.perl index db6103c99..8f5580541 100755 --- a/scripts/training/train-model.perl +++ b/scripts/training/train-model.perl @@ -1919,6 +1919,7 @@ sub create_ini { $phrase_table_impl_name = "PhraseDictionaryBinary" if $phrase_table_impl==1; $phrase_table_impl_name = "PhraseDictionaryOnDisk" if $phrase_table_impl==2; $phrase_table_impl_name = "PhraseDictionaryMemory" if $phrase_table_impl==6; + $phrase_table_impl_name = "PhraseDictionaryALSuffixArray" if $phrase_table_impl==10; #table limit my $table_limit = 0; diff --git a/scripts/training/wrappers/adam-suffix-array/suffix-array-create.sh b/scripts/training/wrappers/adam-suffix-array/suffix-array-create.sh index e5210a990..238a53349 100755 --- a/scripts/training/wrappers/adam-suffix-array/suffix-array-create.sh +++ b/scripts/training/wrappers/adam-suffix-array/suffix-array-create.sh @@ -24,10 +24,10 @@ rm -rf $SA_OUTPUT/bitext pushd . cd $SA_EXEC_DIR -./sa-compile.pl -output $SA_OUTPUT -b bitext_name=$SOURCE_CORPUS,$TARGET_CORPUS -a alignment_name=$ALIGNMENT > $SA_OUTPUT/extract.ini +python $SA_EXEC_DIR/cdec/sa/compile.py -o $SA_OUTPUT -f $SOURCE_CORPUS -e $TARGET_CORPUS -a $ALIGNMENT -c $SA_OUTPUT/extract.ini popd -echo "<s> [X] ||| <s> [S] ||| 1 ||| ||| 0\n" > $GLUE_GRAMMAR -echo "[X][S] </s> [X] ||| [X][S] </s> [S] ||| 1 ||| 0-0 ||| 0\n" >> $GLUE_GRAMMAR -echo "[X][S] [X][X] [X] ||| [X][S] [X][X] [S] ||| 2.718 ||| 0-0 1-1 ||| 0\n" >> $GLUE_GRAMMAR +echo "<s> [X] ||| <s> [S] ||| 1 ||| ||| 0" > $GLUE_GRAMMAR +echo "[X][S] </s> [X] ||| [X][S] </s> [S] ||| 1 ||| 0-0 ||| 0" >> $GLUE_GRAMMAR +echo "[X][S] [X][X] [X] ||| [X][S] [X][X] [S] ||| 2.718 ||| 0-0 1-1 ||| 0" >> $GLUE_GRAMMAR diff --git a/scripts/training/wrappers/adam-suffix-array/suffix-array-extract.sh b/scripts/training/wrappers/adam-suffix-array/suffix-array-extract.sh index eda11dede..8c255b1b6 100755 --- a/scripts/training/wrappers/adam-suffix-array/suffix-array-extract.sh +++ b/scripts/training/wrappers/adam-suffix-array/suffix-array-extract.sh @@ -12,14 +12,14 @@ SA_EXEC_DIR=$1 MODEL_DIR=$2 INPUT_FILE=$3 OUTPUT_DIR=$4 +JOBS=$5 mkdir $OUTPUT_DIR pushd . cd $OUTPUT_DIR -cat $INPUT_FILE | $SA_EXEC_DIR/escape-testset.pl | $SA_EXEC_DIR/extractor.py -c $MODEL_DIR/extract.ini -gzip $OUTPUT_DIR/grammar.out.* +cat $INPUT_FILE | python $SA_EXEC_DIR/cdec/sa/extract.py -c $MODEL_DIR/extract.ini -g $OUTPUT_DIR -j $JOBS -z > $OUTPUT_DIR/input.sgm popd |