Welcome to mirror list, hosted at ThFree Co, Russian Federation.

TranslationAnalysis.cpp « src « moses-chart-cmd - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e7a57d081ea4d5624fdac6c5ec14a95f8561f532 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// $Id: TranslationAnalysis.cpp 2474 2009-08-06 17:32:28Z hieuhoang1972 $

#include <iostream>
#include <sstream>
#include <algorithm>
#include "StaticData.h"
#include "TranslationAnalysis.h"
#include "TranslationOption.h"
#include "DecodeStepTranslation.h"

using namespace std;
using namespace Moses;

namespace TranslationAnalysis {

void PrintTranslationAnalysis(ostream &os, const Hypothesis* hypo)
{
	/*
	os << endl << "TRANSLATION HYPOTHESIS DETAILS:" << endl;
  queue<const Hypothesis*> translationPath;
  while (hypo) 
	{
		translationPath.push(hypo);
    hypo = hypo->GetPrevHypo();
  }

	while (!translationPath.empty())
	{
		hypo = translationPath.front();
		translationPath.pop();
		const TranslationOption *transOpt = hypo->GetTranslationOption();
		if (transOpt != NULL)
		{
			os	<< hypo->GetCurrSourceWordsRange() << "  ";
			for (size_t decodeStepId = 0; decodeStepId < DecodeStepTranslation::GetNumTransStep(); ++decodeStepId)
				os << decodeStepId << "=" << transOpt->GetSubRangeCount(decodeStepId) << ",";
			os	<< *transOpt << endl;
		}
	}

	os << "END TRANSLATION" << endl;
	*/
}

}