diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2016-01-12 20:20:29 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2016-01-12 20:20:29 +0300 |
commit | 8d7dc4b446c66eee1ff0256d71e53347dfa15c7c (patch) | |
tree | e7b41f70bfa914ab1d35adb73a6f30d48f627c2c /moses/Manager.cpp | |
parent | 074614974c408f1e21b5435872ef2c798c8eea18 (diff) |
Bug fix related to --report-all-factors.
Diffstat (limited to 'moses/Manager.cpp')
-rw-r--r-- | moses/Manager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/moses/Manager.cpp b/moses/Manager.cpp index e00457803..3650baabb 100644 --- a/moses/Manager.cpp +++ b/moses/Manager.cpp @@ -1723,8 +1723,8 @@ OutputSurface(std::ostream &out, Hypothesis const& edge, bool const recursive) c 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 (factor) out << fd << *factor; + else out << fd << UNKNOWN_FACTOR; } if(markUnknown && word.IsOOV()) { |