Fixed bug in SemposScorer.cpp

This commit is contained in:
Matous Machacek 2012-05-13 11:11:13 +02:00
parent 97f82a3e4d
commit 3943112eb3

View File

@ -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];