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-03 20:18:19 +0300
committerHieu Hoang <hieuhoang@gmail.com>2014-12-03 20:18:19 +0300
commitf4a716f676e5a10ca1e98b29024d9c799b8193bf (patch)
tree1c0ffddea3171adc83e233d213f6bf51d74f4cb3
parentccbcc14ed863dc903bb8b2d84f5989ef806a0e75 (diff)
move OutputDetailedTranslationReport() to Managers
-rw-r--r--moses/IOWrapper.cpp29
-rw-r--r--moses/IOWrapper.h3
-rw-r--r--moses/TranslationTask.h3
3 files changed, 3 insertions, 32 deletions
diff --git a/moses/IOWrapper.cpp b/moses/IOWrapper.cpp
index aa6b6401e..d8910dc83 100644
--- a/moses/IOWrapper.cpp
+++ b/moses/IOWrapper.cpp
@@ -368,22 +368,6 @@ void IOWrapper::Backtrack(const ChartHypothesis *hypo)
}
}
-void IOWrapper::OutputDetailedTranslationReport(
- const search::Applied *applied,
- const Sentence &sentence,
- long translationId)
-{
- if (applied == NULL) {
- return;
- }
- std::ostringstream out;
- ApplicationContext applicationContext;
-
- OutputTranslationOptions(out, applicationContext, applied, sentence, translationId);
- UTIL_THROW_IF2(m_detailedTranslationCollector == NULL,
- "No ouput file for detailed reports specified");
- m_detailedTranslationCollector->Write(translationId, out.str());
-}
void IOWrapper::OutputTranslationOptions(std::ostream &out, ApplicationContext &applicationContext, const ChartHypothesis *hypo, const Sentence &sentence, long translationId)
{
@@ -1282,19 +1266,6 @@ void IOWrapper::OutputLatticeMBRNBestList(const vector<LatticeMBRSolution>& solu
#include "moses/Syntax/PVertex.h"
#include "moses/Syntax/S2T/DerivationWriter.h"
-void IOWrapper::OutputDetailedTranslationReport(const Syntax::SHyperedge *best,
- long translationId)
-{
- if (best == NULL) {
- return;
- }
- std::ostringstream out;
- Syntax::S2T::DerivationWriter::Write(*best, translationId, out);
- UTIL_THROW_IF2(m_detailedTranslationCollector == NULL,
- "No ouput file for detailed reports specified");
- m_detailedTranslationCollector->Write(translationId, out.str());
-}
-
void IOWrapper::OutputBestHypo(const Syntax::SHyperedge *best,
long translationId)
{
diff --git a/moses/IOWrapper.h b/moses/IOWrapper.h
index 01837725b..c805286b6 100644
--- a/moses/IOWrapper.h
+++ b/moses/IOWrapper.h
@@ -209,9 +209,6 @@ public:
void OutputNBestList(const std::vector<boost::shared_ptr<Moses::ChartKBestExtractor::Derivation> > &nBestList, long translationId);
void OutputNBestList(const Moses::Syntax::KBestExtractor::KBestVec &nBestList, long translationId);
- void OutputDetailedTranslationReport(const search::Applied *applied, const Moses::Sentence &sentence, long translationId);
- void OutputDetailedTranslationReport(const Moses::Syntax::SHyperedge *, long translationId);
-
void OutputDetailedAllTranslationReport(const std::vector<boost::shared_ptr<Moses::ChartKBestExtractor::Derivation> > &nBestList, const Moses::ChartManager &manager, const Moses::Sentence &sentence, long translationId);
void OutputAlignment(size_t translationId , const Moses::ChartHypothesis *hypo);
diff --git a/moses/TranslationTask.h b/moses/TranslationTask.h
index 3b5fe26d1..fa96c2480 100644
--- a/moses/TranslationTask.h
+++ b/moses/TranslationTask.h
@@ -70,9 +70,12 @@ private:
m_ioWrapper.OutputNBestList(nBestList, translationId);
}
// Write 1-best derivation (-translation-details / -T option).
+
+ /*
if (staticData.IsDetailedTranslationReportingEnabled()) {
m_ioWrapper.OutputDetailedTranslationReport(best, translationId);
}
+ */
// Write unknown words file (-output-unknowns option)
if (!staticData.GetOutputUnknownsFile().empty()) {
m_ioWrapper.OutputUnknowns(manager.GetUnknownWords(), translationId);