diff options
author | Nicola Bertoldi <bertoldi@fbk.eu> | 2014-11-18 17:02:26 +0300 |
---|---|---|
committer | Nicola Bertoldi <bertoldi@fbk.eu> | 2014-11-18 17:02:26 +0300 |
commit | 626c9d7a84cdd0e360a174c32668fb3f0096d5ee (patch) | |
tree | 2750e3ca54b0ffb538a800b318e75e358ffd6d69 | |
parent | 88ec4925f2eaa0690ef6dc990f6441246b1cd20d (diff) |
improvement on passthrough information
-rw-r--r-- | moses-cmd/IOWrapper.cpp | 8 | ||||
-rw-r--r-- | moses-cmd/IOWrapper.h | 1 | ||||
-rw-r--r-- | moses/StaticData.cpp | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/moses-cmd/IOWrapper.cpp b/moses-cmd/IOWrapper.cpp index 395bb4260..120301dbe 100644 --- a/moses-cmd/IOWrapper.cpp +++ b/moses-cmd/IOWrapper.cpp @@ -294,9 +294,15 @@ void OutputSurface(std::ostream &out, const Hypothesis &edge, const std::vector< } } +void OutputPassthroughInformation(std::string& passthrough, const Hypothesis *hypo) +{ + passthrough = hypo->GetManager().GetSource().GetPassthroughInformation(); +} + void OutputPassthroughInformation(std::ostream &out, const Hypothesis *hypo) { - std::string passthrough = hypo->GetManager().GetSource().GetPassthroughInformation(); + std::string passthrough; + passthrough = hypo->GetManager().GetSource().GetPassthroughInformation(); out << passthrough; } diff --git a/moses-cmd/IOWrapper.h b/moses-cmd/IOWrapper.h index 0db87051e..7afb18948 100644 --- a/moses-cmd/IOWrapper.h +++ b/moses-cmd/IOWrapper.h @@ -139,6 +139,7 @@ void OutputBestHypo(const std::vector<Moses::Word>& mbrBestHypo, long /*transla char reportSegmentation, bool reportAllFactors, std::ostream& out); void OutputBestHypo(const Moses::TrellisPath &path, long /*translationId*/,char reportSegmentation, bool reportAllFactors, std::ostream &out); void OutputInput(std::ostream& os, const Moses::Hypothesis* hypo); +void OutputPassthroughInformation(std::string& passthrough, const Moses::Hypothesis* hypo); void OutputPassthroughInformation(std::ostream& os, const Moses::Hypothesis* hypo); void OutputAlignment(Moses::OutputCollector* collector, size_t lineNo, const Moses::Hypothesis *hypo); void OutputAlignment(Moses::OutputCollector* collector, size_t lineNo, const Moses::TrellisPath &path); diff --git a/moses/StaticData.cpp b/moses/StaticData.cpp index cf40b27e4..2d19842da 100644 --- a/moses/StaticData.cpp +++ b/moses/StaticData.cpp @@ -169,6 +169,7 @@ bool StaticData::LoadData(Parameter *parameter) m_needAlignmentInfo = true; } + SetBooleanParameter( &m_PrintID, "print-id", false ); SetBooleanParameter( &m_PrintPassthroughInformation, "print-passthrough", false ); SetBooleanParameter( &m_PrintPassthroughInformationInNBest, "print-passthrough-in-n-best", false ); |