Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2014-12-04 19:25:19 +0300
committerHieu Hoang <hieuhoang@gmail.com>2014-12-04 19:25:19 +0300
commitc5fdb170fbe82213dc123b7b892ded7d32695d2c (patch)
tree00610370daccd6a94c3668ad666831b567b398b0 /moses/ChartManager.cpp
parentd5e315a599196f40229ab05cd5ab49fbd8ec100d (diff)
move OutputUnknowns() into Managers
Diffstat (limited to 'moses/ChartManager.cpp')
-rw-r--r--moses/ChartManager.cpp16
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