diff options
author | Philipp Koehn <phi@jhu.edu> | 2015-07-20 18:40:53 +0300 |
---|---|---|
committer | Philipp Koehn <phi@jhu.edu> | 2015-07-20 18:40:53 +0300 |
commit | ec3413f7b54e8a498ea7fe1a63e9b35fdc40a7f3 (patch) | |
tree | 0994258e43ae8e5ac527095dcb30f5a3db804c3f /moses/Manager.cpp | |
parent | 7b19d83d439173a31de64cd954c9b1df69613ed0 (diff) |
allow customized prefix/suffix to mark unknown words
Diffstat (limited to 'moses/Manager.cpp')
-rw-r--r-- | moses/Manager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/moses/Manager.cpp b/moses/Manager.cpp index 7580b4e6e..ec4f57739 100644 --- a/moses/Manager.cpp +++ b/moses/Manager.cpp @@ -1737,7 +1737,9 @@ void Manager::OutputSurface(std::ostream &out, const Hypothesis &edge, const std //preface surface form with UNK if marking unknowns const Word &word = phrase.GetWord(pos); if(markUnknown && word.IsOOV()) { - out << "UNK" << *factor; + out << StaticData::Instance().GetUnknownWordPrefix() + << *factor + << StaticData::Instance().GetUnknownWordSuffix(); } else { out << *factor; } |