mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-01 00:12:27 +03:00
Fixed bug in SemposScorer.cpp
This commit is contained in:
parent
cbc7d8976d
commit
a878af3916
@ -89,6 +89,7 @@ void SemposScorer::splitSentence(const string& sentence, str_sentence_t& splitSe
|
||||
split(sentence, ' ', tokens);
|
||||
for (vector<string>::iterator it = tokens.begin(); it != tokens.end(); ++it) {
|
||||
vector<string> factors;
|
||||
if (it->empty()) continue;
|
||||
split(*it, '|', factors);
|
||||
if (factors.size() != 2) throw runtime_error("Sempos scorer accepts two factors (item|class)");
|
||||
const string& item = factors[0];
|
||||
|
Loading…
Reference in New Issue
Block a user