diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-12-02 23:43:56 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-12-02 23:43:56 +0300 |
commit | 5a6328644721e05141593a1d3e0fd378a8d96561 (patch) | |
tree | 8b0146c8960697658cd40ebf423888c11d7a5416 /moses/ChartManager.cpp | |
parent | 33f4e9391537728d2e1e1638611f99db42e91567 (diff) |
Code cleanup and bug fix in (Base)Manager::OutputSurface:
Mark-up of unkown words in output.
Diffstat (limited to 'moses/ChartManager.cpp')
-rw-r--r-- | moses/ChartManager.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/moses/ChartManager.cpp b/moses/ChartManager.cpp index e4704fe79..2688dbdba 100644 --- a/moses/ChartManager.cpp +++ b/moses/ChartManager.cpp @@ -317,15 +317,15 @@ void ChartManager::OutputBest(OutputCollector *collector) const void ChartManager::OutputNBest(OutputCollector *collector) const { - const StaticData &staticData = StaticData::Instance(); - size_t nBestSize = staticData.options().nbest.nbest_size; + // const StaticData &staticData = StaticData::Instance(); + size_t nBestSize = options().nbest.nbest_size; if (nBestSize > 0) { const size_t translationId = m_source.GetTranslationId(); VERBOSE(2,"WRITING " << nBestSize << " TRANSLATION ALTERNATIVES TO " - << staticData.options().nbest.output_file_path << endl); + << options().nbest.output_file_path << endl); std::vector<boost::shared_ptr<ChartKBestExtractor::Derivation> > nBestList; - CalcNBest(nBestSize, nBestList,staticData.options().nbest.only_distinct); + CalcNBest(nBestSize, nBestList, options().nbest.only_distinct); OutputNBestList(collector, nBestList, translationId); IFVERBOSE(2) { PrintUserTime("N-Best Hypotheses Generation Time:"); @@ -338,8 +338,8 @@ void ChartManager::OutputNBestList(OutputCollector *collector, const ChartKBestExtractor::KBestVec &nBestList, long translationId) const { - const StaticData &staticData = StaticData::Instance(); - const std::vector<Moses::FactorType> &outputFactorOrder = staticData.GetOutputFactorOrder(); + // const StaticData &staticData = StaticData::Instance(); + // const std::vector<Moses::FactorType> &outputFactorOrder = staticData.GetOutputFactorOrder(); std::ostringstream out; @@ -349,7 +349,7 @@ void ChartManager::OutputNBestList(OutputCollector *collector, FixPrecision(out); } - NBestOptions const& nbo = StaticData::Instance().options().nbest; + NBestOptions const& nbo = options().nbest; bool includeWordAlignment = nbo.include_alignment_info; bool PrintNBestTrees = nbo.print_trees; @@ -368,7 +368,7 @@ void ChartManager::OutputNBestList(OutputCollector *collector, // print the translation ID, surface factors, and scores out << translationId << " ||| "; - OutputSurface(out, outputPhrase, outputFactorOrder, false); + OutputSurface(out, outputPhrase); // , outputFactorOrder, false); out << " ||| "; boost::shared_ptr<ScoreComponentCollection> scoreBreakdown = ChartKBestExtractor::GetOutputScoreBreakdown(derivation); bool with_labels = options().nbest.include_feature_labels; |