diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2014-08-06 18:03:37 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2014-08-06 18:03:37 +0400 |
commit | 23f10cc73f5d7e18751da2189ab6a364b5869bc7 (patch) | |
tree | 1288b2a350032a7df2011177771ad3d03192e937 /moses/TranslationOptionCollection.cpp | |
parent | 35c346378e3fe71b5d3f2408a034704771ec458e (diff) |
move notice about czech prefixes to share/README
Diffstat (limited to 'moses/TranslationOptionCollection.cpp')
-rw-r--r-- | moses/TranslationOptionCollection.cpp | 8 |
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 |