mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-02 17:09:36 +03:00
More explaination about <s> error
This commit is contained in:
parent
7ee2d064b8
commit
10c1e9ec2e
@ -100,7 +100,7 @@ void LanguageModelImplementation::CalcScore(const Phrase &phrase, float &fullSco
|
||||
if (word == GetSentenceStartArray()) {
|
||||
// do nothing, don't include prob for <s> unigram
|
||||
if (currPos != 0) {
|
||||
std::cerr << "Your data contains <s> in a position other than the first word." << std::endl;
|
||||
std::cerr << "Either your data contains <s> in a position other than the first word or your language model is missing <s>. Did you build your ARPA using IRSTLM and forget to run add-start-end.sh?" << std::endl;
|
||||
abort();
|
||||
}
|
||||
} else {
|
||||
|
@ -198,7 +198,7 @@ template <class Model> void LanguageModelKen<Model>::CalcScore(const Phrase &phr
|
||||
} else {
|
||||
lm::WordIndex index = TranslateID(word);
|
||||
if (index == m_ngram->GetVocabulary().BeginSentence()) {
|
||||
std::cerr << "Your data contains <s> in a position other than the first word." << std::endl;
|
||||
std::cerr << "Either your data contains <s> in a position other than the first word or your language model is missing <s>. Did you build your ARPA using IRSTLM and forget to run add-start-end.sh?" << std::endl;
|
||||
abort();
|
||||
}
|
||||
float score = TransformLMScore(m_ngram->Score(*state0, index, *state1));
|
||||
|
Loading…
Reference in New Issue
Block a user