mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-10-06 08:18:02 +03:00
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:
parent
324393afe7
commit
8fc1c1b95e
@ -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");
|
||||||
|
Loading…
Reference in New Issue
Block a user