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-30 16:23:30 +0300
committerHieu Hoang <hieuhoang@gmail.com>2014-12-30 16:23:30 +0300
commitba166f109cc1bda482e32ba490905d769dc1b9ae (patch)
tree07741cdfbdb178f2dace9cdfba125c369d0cba55 /moses/Manager.cpp
parent14cbf9bc2263485a5bef03fd61632a3fda41af6c (diff)
moving more stuff out of IOWrapper
Diffstat (limited to 'moses/Manager.cpp')
-rw-r--r--moses/Manager.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/moses/Manager.cpp b/moses/Manager.cpp
index ebd204e97..755547c34 100644
--- a/moses/Manager.cpp
+++ b/moses/Manager.cpp
@@ -1497,7 +1497,7 @@ void Manager::OutputNBest(std::ostream& out
out << " |||";
// print scores with feature names
- OutputAllFeatureScores(path.GetScoreBreakdown(), out );
+ path.GetScoreBreakdown().OutputAllFeatureScores(out );
// total
out << " ||| " << path.GetTotalScore();
@@ -1617,7 +1617,7 @@ void Manager::OutputSurface(std::ostream &out, const Hypothesis &edge, const std
out << ",";
ScoreComponentCollection scoreBreakdown(edge.GetScoreBreakdown());
scoreBreakdown.MinusEquals(edge.GetPrevHypo()->GetScoreBreakdown());
- OutputAllFeatureScores(scoreBreakdown, out);
+ scoreBreakdown.OutputAllFeatureScores(out);
}
out << "| ";
}
@@ -1864,4 +1864,15 @@ void Manager::OutputBestHypo(const std::vector<Word>& mbrBestHypo, long /*trans
out << endl;
}
+void Manager::OutputBestHypo(const Moses::TrellisPath &path, long /*translationId*/, char reportSegmentation, bool reportAllFactors, std::ostream &out) const
+{
+ const std::vector<const Hypothesis *> &edges = path.GetEdges();
+
+ for (int currEdge = (int)edges.size() - 1 ; currEdge >= 0 ; currEdge--) {
+ const Hypothesis &edge = *edges[currEdge];
+ OutputSurface(out, edge, StaticData::Instance().GetOutputFactorOrder(), reportSegmentation, reportAllFactors);
+ }
+ out << endl;
+}
+
} // namespace