diff options
author | hieuhoang1972 <hieuhoang1972@1f5c12ca-751b-0410-a591-d2e778427230> | 2010-05-06 23:46:23 +0400 |
---|---|---|
committer | hieuhoang1972 <hieuhoang1972@1f5c12ca-751b-0410-a591-d2e778427230> | 2010-05-06 23:46:23 +0400 |
commit | 034528988d4d10dae9d5db2090f3f82dc18ac09f (patch) | |
tree | 7c807d40fb595345836e7862ef8894fc713c21e2 /moses-chart-cmd/src | |
parent | d4a6397ac436ee4e63d637d64a23ef27ef4f1963 (diff) |
better -T output for chart decoding
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3231 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'moses-chart-cmd/src')
-rw-r--r-- | moses-chart-cmd/src/IOWrapper.cpp | 5 | ||||
-rw-r--r-- | moses-chart-cmd/src/Main.cpp | 9 |
2 files changed, 7 insertions, 7 deletions
diff --git a/moses-chart-cmd/src/IOWrapper.cpp b/moses-chart-cmd/src/IOWrapper.cpp index 8bf48a8a8..d6d9a687f 100644 --- a/moses-chart-cmd/src/IOWrapper.cpp +++ b/moses-chart-cmd/src/IOWrapper.cpp @@ -260,8 +260,9 @@ void OutputTranslationOptions(const MosesChart::Hypothesis *hypo, long translati { // recursive if (hypo != NULL) { - //cerr << "Trans Opt " << translationId << " " << hypo->GetCurrSourceRange() << " = " << hypo->GetCurrTargetPhrase() << endl; - cerr << *hypo << endl; + cerr << "Trans Opt " << translationId << " " << hypo->GetCurrSourceRange() << ": " << hypo->GetCurrChartRule() + << " " << hypo->GetTotalScore() << hypo->GetScoreBreakdown() + << endl; } const std::vector<const MosesChart::Hypothesis*> &prevHypos = hypo->GetPrevHypos(); diff --git a/moses-chart-cmd/src/Main.cpp b/moses-chart-cmd/src/Main.cpp index c614bc5f6..9ee16a237 100644 --- a/moses-chart-cmd/src/Main.cpp +++ b/moses-chart-cmd/src/Main.cpp @@ -98,16 +98,15 @@ int main(int argc, char* argv[]) cerr.precision(3); // load data structures - Parameter *parameter = new Parameter(); - if (!parameter->LoadParam(argc, argv)) + Parameter parameter; + if (!parameter.LoadParam(argc, argv)) { - parameter->Explain(); - delete parameter; + parameter.Explain(); return EXIT_FAILURE; } const StaticData &staticData = StaticData::Instance(); - if (!StaticData::LoadDataStatic(parameter)) + if (!StaticData::LoadDataStatic(¶meter)) return EXIT_FAILURE; assert(staticData.GetSearchAlgorithm() == ChartDecoding); |