Revert "Merge pull request #158 from da-web/patch-1"

This reverts commit f7ea8fe0da, reversing
changes made to 03d8747e65.
This commit is contained in:
Hieu Hoang 2016-07-05 11:26:04 +01:00
parent 0f99cb9ba6
commit bf4109655f

View File

@ -1814,7 +1814,7 @@ sub score_phrase_phrase_extract {
$cmd .= " --LogProb" if $LOG_PROB;
$cmd .= " --NegLogProb" if $NEG_LOG_PROB;
$cmd .= " --OnlyDirect" if $ONLY_DIRECT;
$cmd .= " --PhraseCount" if $PHRASE_COUNT;
$cmd .= " --NoPhraseCount" unless $PHRASE_COUNT;
$cmd .= " --LowCountFeature" if $LOW_COUNT;
$cmd .= " --CountBinFeature $COUNT_BIN" if $COUNT_BIN;
$cmd .= " --SparseCountBinFeature $SPARSE_COUNT_BIN" if $SPARSE_COUNT_BIN;
@ -2099,7 +2099,7 @@ sub create_ini {
$basic_weight_count+=2 if defined($_SCORE_OPTIONS) && $_SCORE_OPTIONS =~ /UnalignedPenalty/; # word ins/del
$basic_weight_count+=2 if defined($_SCORE_OPTIONS) && $_SCORE_OPTIONS =~ /UnalignedFunctionWordPenalty/;
$basic_weight_count /= 2 if defined($_SCORE_OPTIONS) && $_SCORE_OPTIONS =~ /OnlyDirect/;
$basic_weight_count++ if !defined($_SCORE_OPTIONS) || $_SCORE_OPTIONS !~ /NoPhraseCount/; # phrase count feature
$basic_weight_count++ if defined($_SCORE_OPTIONS) && $_SCORE_OPTIONS =~ /PhraseCount/; # phrase count feature
$basic_weight_count++ if defined($_SCORE_OPTIONS) && $_SCORE_OPTIONS =~ /LowCountFeature/; # low count feature
if (defined($_SCORE_OPTIONS) && $_SCORE_OPTIONS =~ /(\-CountBinFeature [\s\d]*\d)/) {
$basic_weight_count += scalar split(/\s+/,$1);