mosesdecoder/moses-chart-cmd/TranslationAnalysis.cpp
2012-11-12 21:12:01 +00:00

50 lines
1.1 KiB
C++

// $Id$
#include <iostream>
#include <sstream>
#include <algorithm>
#include "TranslationAnalysis.h"
#include "moses/StaticData.h"
#include "moses/TranslationOption.h"
#include "moses/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;
*/
}
}