diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2014-12-04 19:25:19 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2014-12-04 19:25:19 +0300 |
commit | c5fdb170fbe82213dc123b7b892ded7d32695d2c (patch) | |
tree | 00610370daccd6a94c3668ad666831b567b398b0 /moses/ChartManager.cpp | |
parent | d5e315a599196f40229ab05cd5ab49fbd8ec100d (diff) |
move OutputUnknowns() into Managers
Diffstat (limited to 'moses/ChartManager.cpp')
-rw-r--r-- | moses/ChartManager.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/moses/ChartManager.cpp b/moses/ChartManager.cpp index 072ce427c..a90ea717d 100644 --- a/moses/ChartManager.cpp +++ b/moses/ChartManager.cpp @@ -663,5 +663,21 @@ void ChartManager::ReconstructApplicationContext(const ChartHypothesis &hypo, } } +void ChartManager::OutputUnknowns(OutputCollector *collector) const +{ + if (collector) { + long translationId = m_source.GetTranslationId(); + const std::vector<Phrase*> &oovs = GetParser().GetUnknownSources(); + + std::ostringstream out; + for (std::vector<Phrase*>::const_iterator p = oovs.begin(); + p != oovs.end(); ++p) { + out << *p; + } + out << std::endl; + collector->Write(translationId, out.str()); + } + +} } // namespace Moses |