Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzens <zens@1f5c12ca-751b-0410-a591-d2e778427230>2006-07-24 22:33:08 +0400
committerzens <zens@1f5c12ca-751b-0410-a591-d2e778427230>2006-07-24 22:33:08 +0400
commit422418008ea4ce09774460e835402b029ec1825b (patch)
tree96e96980f42a97f2aa7143ae3f440ce68c8060f8 /moses/src/StaticData.cpp
parent90124bd40335a9e19ebd7a4eb563857d01fc1c3b (diff)
- confusion net:
* more robust read functions * correct treatment of epsilons * code cleanup - parameter: fixed check for binary phrase table - staticData: do not read input phrases in case of binary phrase table git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@260 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'moses/src/StaticData.cpp')
-rwxr-xr-xmoses/src/StaticData.cpp41
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