mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-30 23:42:30 +03:00
Fix bug in loading of in-memory rule tables.
The case where there was no phrase counts was not handled correctly.
This commit is contained in:
parent
2d71e5be60
commit
2f8bffb1e1
@ -181,6 +181,10 @@ bool RuleTableLoaderStandard::Load(FormatType format
|
|||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tokens.size() == 4) {
|
||||||
|
tokens.push_back("1 1"); //dummy rule count for glue rules
|
||||||
|
}
|
||||||
|
|
||||||
const string &sourcePhraseString = tokens[0]
|
const string &sourcePhraseString = tokens[0]
|
||||||
, &targetPhraseString = tokens[1]
|
, &targetPhraseString = tokens[1]
|
||||||
, &scoreString = tokens[2]
|
, &scoreString = tokens[2]
|
||||||
|
Loading…
Reference in New Issue
Block a user