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:
Barry Haddow 2012-08-17 16:27:17 +01:00
parent 2d71e5be60
commit 2f8bffb1e1

View File

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