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-10 14:01:56 +0300
committerHieu Hoang <hieuhoang@gmail.com>2014-12-10 14:01:56 +0300
commitfad3ef687a2ed3c40c6da5e9909a9576cb5cb3a3 (patch)
tree5d283c6929bf9ec2e702e5837d247dd7692b5beb /moses/IOWrapper.cpp
parenta4c9e5f9200be7f515441b9356e0e1b03ae2b596 (diff)
move OutputBest() to Syntax::Manager
Diffstat (limited to 'moses/IOWrapper.cpp')
-rw-r--r--moses/IOWrapper.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/moses/IOWrapper.cpp b/moses/IOWrapper.cpp
index ee7b12db5..ee736585c 100644
--- a/moses/IOWrapper.cpp
+++ b/moses/IOWrapper.cpp
@@ -872,38 +872,5 @@ void IOWrapper::OutputLatticeMBRNBestList(const vector<LatticeMBRSolution>& solu
OutputLatticeMBRNBest(*m_nBestStream, solutions,translationId);
}
-////////////////////////////
-#include "moses/Syntax/PVertex.h"
-#include "moses/Syntax/S2T/DerivationWriter.h"
-
-void IOWrapper::OutputBestHypo(const Syntax::SHyperedge *best,
- long translationId)
-{
- if (!m_singleBestOutputCollector) {
- return;
- }
- std::ostringstream out;
- FixPrecision(out);
- if (best == NULL) {
- VERBOSE(1, "NO BEST TRANSLATION" << std::endl);
- if (StaticData::Instance().GetOutputHypoScore()) {
- out << "0 ";
- }
- } else {
- if (StaticData::Instance().GetOutputHypoScore()) {
- out << best->score << " ";
- }
- Phrase yield = Syntax::GetOneBestTargetYield(*best);
- // delete 1st & last
- UTIL_THROW_IF2(yield.GetSize() < 2,
- "Output phrase should have contained at least 2 words (beginning and end-of-sentence)");
- yield.RemoveWord(0);
- yield.RemoveWord(yield.GetSize()-1);
- out << yield.GetStringRep(StaticData::Instance().GetOutputFactorOrder());
- out << '\n';
- }
- m_singleBestOutputCollector->Write(translationId, out.str());
-}
-
} // namespace