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: 1ba6052edca3086c5023fda1b4e877a3630dd2c6 (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
47
// $Id$

#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;
  */
}

}