From 626c9d7a84cdd0e360a174c32668fb3f0096d5ee Mon Sep 17 00:00:00 2001 From: Nicola Bertoldi Date: Tue, 18 Nov 2014 15:02:26 +0100 Subject: improvement on passthrough information --- moses-cmd/IOWrapper.cpp | 8 +++++++- moses-cmd/IOWrapper.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'moses-cmd') 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& 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); -- cgit v1.2.3