diff options
author | MosesAdmin <moses-support-owner@mit.edu> | 2015-12-03 03:01:07 +0300 |
---|---|---|
committer | MosesAdmin <moses-support-owner@mit.edu> | 2015-12-03 03:01:07 +0300 |
commit | 157be7cc519fd8afae979b18fa64967eb9c5f38f (patch) | |
tree | 1af5f33960b69b66427dd57244bac0afa36e9c47 /moses/Manager.cpp | |
parent | 97d6ccec9814f1b1ec3bb3d1e67358bc411425dd (diff) |
daily automatic beautifier
Diffstat (limited to 'moses/Manager.cpp')
-rw-r--r-- | moses/Manager.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/moses/Manager.cpp b/moses/Manager.cpp index 5e537bcdc..ce1fadddd 100644 --- a/moses/Manager.cpp +++ b/moses/Manager.cpp @@ -1750,10 +1750,10 @@ OutputSurface(std::ostream &out, const Hypothesis &edge) const FactorType placeholderFactor = options().input.placeholder_factor; std::map<size_t, const Factor*> placeholders; - if (placeholderFactor != NOT_FOUND) { - // creates map of target position -> factor for placeholders - placeholders = GetPlaceholders(edge, placeholderFactor); - } + if (placeholderFactor != NOT_FOUND) { + // creates map of target position -> factor for placeholders + placeholders = GetPlaceholders(edge, placeholderFactor); + } bool markUnknown = options().unk.mark; std::string const& fd = options().output.FactorDelimiter; @@ -1776,19 +1776,19 @@ OutputSurface(std::ostream &out, const Hypothesis &edge) const const Word &word = phrase.GetWord(pos); if(markUnknown && word.IsOOV()) { out << options().unk.prefix; - } - + } + out << *factor; for (size_t i = 1 ; i < outputFactorOrder.size() ; i++) { const Factor *factor = phrase.GetFactor(pos, outputFactorOrder[i]); UTIL_THROW_IF2(factor==NULL,"No factor "<<i<<" at position "<< pos); out << fd << *factor; } - + if(markUnknown && word.IsOOV()) { out << options().unk.suffix; } - + out << " "; } |