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:
authorUlrich Germann <Ulrich.Germann@gmail.com>2015-12-08 02:34:57 +0300
committerUlrich Germann <Ulrich.Germann@gmail.com>2015-12-08 02:50:56 +0300
commitc1a008bf6dd00e65a93b813a9bb3472b68353916 (patch)
treea5d76a9b0c61a6ffd12aceef420389313e1d867c /moses/TranslationOptionCollection.cpp
parent0db3e544fd6f718ecbc4e774954f0a403d8d3ee1 (diff)
Reduce dependence on StaticData.
Diffstat (limited to 'moses/TranslationOptionCollection.cpp')
-rw-r--r--moses/TranslationOptionCollection.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/moses/TranslationOptionCollection.cpp b/moses/TranslationOptionCollection.cpp
index 78c133233..ecdd04038 100644
--- a/moses/TranslationOptionCollection.cpp
+++ b/moses/TranslationOptionCollection.cpp
@@ -145,12 +145,14 @@ ProcessUnknownWord()
}
}
- bool alwaysCreateDirectTranslationOption
- = StaticData::Instance().IsAlwaysCreateDirectTranslationOption();
+ // bool alwaysCreateDirectTranslationOption
+ // = StaticData::Instance().IsAlwaysCreateDirectTranslationOption();
+ bool always = m_ttask.lock()->options().unk.always_create_direct_transopt;
+
// create unknown words for 1 word coverage where we don't have any trans options
for (size_t pos = 0 ; pos < size ; ++pos) {
TranslationOptionList* fullList = GetTranslationOptionList(pos, pos);
- if (!fullList || fullList->size() == 0 || alwaysCreateDirectTranslationOption)
+ if (!fullList || fullList->size() == 0 || always)
ProcessUnknownWord(pos);
}
}