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:
authorHieu Hoang <hieu@hoang.co.uk>2014-08-06 18:03:37 +0400
committerHieu Hoang <hieu@hoang.co.uk>2014-08-06 18:03:37 +0400
commit23f10cc73f5d7e18751da2189ab6a364b5869bc7 (patch)
tree1288b2a350032a7df2011177771ad3d03192e937 /moses/TranslationOptionCollection.cpp
parent35c346378e3fe71b5d3f2408a034704771ec458e (diff)
move notice about czech prefixes to share/README
Diffstat (limited to 'moses/TranslationOptionCollection.cpp')
-rw-r--r--moses/TranslationOptionCollection.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/moses/TranslationOptionCollection.cpp b/moses/TranslationOptionCollection.cpp
index 49fdc2987..8f9f3ddc1 100644
--- a/moses/TranslationOptionCollection.cpp
+++ b/moses/TranslationOptionCollection.cpp
@@ -212,6 +212,12 @@ void TranslationOptionCollection::ProcessOneUnknownWord(const InputPath &inputPa
float unknownScore = FloorScore(TransformScore(0));
const Word &sourceWord = inputPath.GetPhrase().GetWord(0);
+ // hack. Once the OOV FF is a phrase table, get rid of this
+ PhraseDictionary *firstPt = NULL;
+ if (PhraseDictionary::GetColl().size() == 0) {
+ firstPt = PhraseDictionary::GetColl()[0];
+ }
+
// unknown word, add as trans opt
FactorCollection &factorCollection = FactorCollection::Instance();
@@ -231,7 +237,7 @@ void TranslationOptionCollection::ProcessOneUnknownWord(const InputPath &inputPa
// modify the starting bitmap
}
- TargetPhrase targetPhrase(NULL);
+ TargetPhrase targetPhrase(firstPt);
if (!(staticData.GetDropUnknown() || isEpsilon) || isDigit) {
// add to dictionary