mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 19:27:11 +03:00
Fix moses mt compile error
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@2886 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
20216dbfec
commit
2396f6d9e9
@ -119,6 +119,18 @@ class TranslationTask : public Task {
|
||||
const Hypothesis* bestHypo = NULL;
|
||||
if (!staticData.UseMBR()) {
|
||||
bestHypo = manager.GetBestHypothesis();
|
||||
if (bestHypo) {
|
||||
OutputSurface(
|
||||
out,
|
||||
bestHypo,
|
||||
staticData.GetOutputFactorOrder(),
|
||||
staticData.GetReportSegmentation(),
|
||||
staticData.GetReportAllFactors());
|
||||
IFVERBOSE(1) {
|
||||
debug << "BEST TRANSLATION: " << *bestHypo << endl;
|
||||
}
|
||||
}
|
||||
out << endl;
|
||||
} else {
|
||||
//MBR decoding
|
||||
size_t nBestSize = staticData.GetMBRSize();
|
||||
@ -130,23 +142,16 @@ class TranslationTask : public Task {
|
||||
manager.CalcNBest(nBestSize, nBestList,true);
|
||||
VERBOSE(2,"size of n-best: " << nBestList.GetSize() << " (" << nBestSize << ")" << endl);
|
||||
IFVERBOSE(2) { PrintUserTime("calculated n-best list for MBR decoding"); }
|
||||
bestHypo = doMBR(nBestList)->GetEdges().at(0);
|
||||
std::vector<const Factor*> mbrBestHypo = doMBR(nBestList);
|
||||
for (size_t i = 0 ; i < mbrBestHypo.size() ; i++) {
|
||||
const Factor *factor = mbrBestHypo[i];
|
||||
if (i>0) out << " ";
|
||||
out << factor->GetString();
|
||||
}
|
||||
out << endl;
|
||||
IFVERBOSE(2) { PrintUserTime("finished MBR decoding"); }
|
||||
}
|
||||
}
|
||||
if (bestHypo) {
|
||||
OutputSurface(
|
||||
out,
|
||||
bestHypo,
|
||||
staticData.GetOutputFactorOrder(),
|
||||
staticData.GetReportSegmentation(),
|
||||
staticData.GetReportAllFactors());
|
||||
IFVERBOSE(1) {
|
||||
debug << "BEST TRANSLATION: " << *bestHypo << endl;
|
||||
}
|
||||
}
|
||||
out << endl;
|
||||
|
||||
m_outputCollector->Write(m_lineNumber,out.str(),debug.str());
|
||||
}
|
||||
if (m_nbestCollector) {
|
||||
|
Loading…
Reference in New Issue
Block a user