Fix loading of gzipped phrase tables

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@2073 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
bhaddow 2009-02-04 11:09:38 +00:00
parent 324393afe7
commit 8fc1c1b95e

View File

@ -796,10 +796,14 @@ bool StaticData::LoadPhraseTables()
IFVERBOSE(1) IFVERBOSE(1)
PrintUserTime(string("Start loading PhraseTable ") + filePath); PrintUserTime(string("Start loading PhraseTable ") + filePath);
std::cerr << "filePath: " << filePath << std::endl; VERBOSE(1,"filePath: " << filePath << endl);
if (!FileExists(filePath+".binphr.idx")) if (!FileExists(filePath+".binphr.idx"))
{ // memory phrase table { // memory phrase table
VERBOSE(2,"using standard phrase tables"); VERBOSE(2,"using standard phrase tables" << endl);
if (!FileExists(filePath) && FileExists(filePath + ".gz")) {
filePath += ".gz";
VERBOSE(2,"Using gzipped file" << endl);
}
if (m_inputType != SentenceInput) if (m_inputType != SentenceInput)
{ {
UserMessage::Add("Must use binary phrase table for this input type"); UserMessage::Add("Must use binary phrase table for this input type");