Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatous Machacek <machacekmatous@gmail.com>2012-05-13 13:11:13 +0400
committerMatous Machacek <machacekmatous@gmail.com>2012-05-13 13:11:13 +0400
commit3943112eb3838c7f1e2acbd1285b5a3b5ab49b6e (patch)
treee8866fbf2637ab4c0ca8f8f3e28d4f0e8fef25dc /mert/SemposScorer.cpp
parent97f82a3e4d41bcd39f9ca1d4a387a584e715a20a (diff)
Fixed bug in SemposScorer.cpp
Diffstat (limited to 'mert/SemposScorer.cpp')
-rw-r--r--mert/SemposScorer.cpp1
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];