diff options
Diffstat (limited to 'moses/src/StaticData.cpp')
-rwxr-xr-x | moses/src/StaticData.cpp | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/moses/src/StaticData.cpp b/moses/src/StaticData.cpp index 7da13e37b..44323a3e4 100755 --- a/moses/src/StaticData.cpp +++ b/moses/src/StaticData.cpp @@ -418,30 +418,31 @@ void StaticData::LoadPhraseTables(bool filter + PROJECT_NAME + "--" + inputFileHash + "--" + phraseTableHash + ".txt"; - bool filterPhrase; - if (filter) - { - boost::filesystem::path tempFile(hashFilePath, boost::filesystem::native); - if (boost::filesystem::exists(tempFile)) - { // load filtered file instead - filterPhrase = false; - filePath = hashFilePath; - } - else - { // load original file & create has file - filterPhrase = true; - } - } - else - { // load original file - filterPhrase = false; - } - TRACE_ERR(filePath << endl); timer.check("Start loading PhraseTable"); - if (!boost::filesystem::exists(filePath+".binphr.idx")) { + bool filterPhrase; + if (filter) + { + boost::filesystem::path tempFile(hashFilePath, boost::filesystem::native); + if (boost::filesystem::exists(tempFile)) + { // load filtered file instead + filterPhrase = false; + filePath = hashFilePath; + } + else + { // load original file & create has file + filterPhrase = true; + } + } + else + { // load original file + filterPhrase = false; + } + TRACE_ERR(filePath << endl); + + TRACE_ERR("using standard phrase tables"); PhraseDictionary *pd=new PhraseDictionary(noScoreComponent); pd->Load(input |