argument --NonTermConsecSourceMixedSyntax

This commit is contained in:
Hieu Hoang 2014-09-03 02:33:50 +01:00
parent b0ee7f68e2
commit 0b41879a3a
2 changed files with 12 additions and 2 deletions

View File

@ -57,7 +57,7 @@ int main(int argc, char** argv)
("ScopeSpan", po::value<string>()->default_value(params.scopeSpanStr), "Min and max span for rules of each scope. Format is min,max:min,max...")
("NonTermConsecSource", "Allow consecutive non-terms on the source side")
("NonTermConsecSourceMixedSyntax", po::value<int>()->default_value(params.nonTermConsecSourceMixedSyntax), "In mixed syntax mode, what nt can be consecutive. 0=don't allow consec nt. 1(default)=hiero+syntax.");
("NonTermConsecSourceMixedSyntax", po::value<int>()->default_value(params.nonTermConsecSourceMixedSyntax), "In mixed syntax mode, what nt can be consecutive. 0=don't allow consec nt. 1(default)=hiero+syntax. 2=syntax+syntax. 3=always allow");
po::variables_map vm;

View File

@ -351,7 +351,17 @@ void Rule::Prevalidate(const Parameter &params)
return;
}
break;
}
case 2:
if (lastNonTerm.IsHiero(Moses::Input, params)
|| secondLastNonTerm.IsHiero(Moses::Input, params)) {
m_isValid = false;
m_canRecurse = false;
return;
}
break;
case 3:
break;
} // switch
}
}
}