diff options
author | Matous Machacek <machacekmatous@gmail.com> | 2012-05-13 13:11:13 +0400 |
---|---|---|
committer | Matous Machacek <machacekmatous@gmail.com> | 2012-05-13 13:11:13 +0400 |
commit | 3943112eb3838c7f1e2acbd1285b5a3b5ab49b6e (patch) | |
tree | e8866fbf2637ab4c0ca8f8f3e28d4f0e8fef25dc /mert/SemposScorer.cpp | |
parent | 97f82a3e4d41bcd39f9ca1d4a387a584e715a20a (diff) |
Fixed bug in SemposScorer.cpp
Diffstat (limited to 'mert/SemposScorer.cpp')
-rw-r--r-- | mert/SemposScorer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mert/SemposScorer.cpp b/mert/SemposScorer.cpp index 30105c01f..7f4b3cc14 100644 --- a/mert/SemposScorer.cpp +++ b/mert/SemposScorer.cpp @@ -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]; |