From fa56d7861f150c9b5d716d34375ec86ed2b6e5d5 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Fri, 24 Aug 2012 19:11:35 +0100 Subject: [PATCH] word alignment info for hiero grammar --- phrase-extract/score.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/phrase-extract/score.cpp b/phrase-extract/score.cpp index 20028f6b4..225b5f2c9 100644 --- a/phrase-extract/score.cpp +++ b/phrase-extract/score.cpp @@ -550,6 +550,10 @@ void outputPhrasePair(const PhraseAlignmentCollection &phrasePair, float totalCo int sourcePos = *(bestAlignment->alignedToT[ j ].begin()); phraseTableFile << sourcePos << "-" << j << " "; } + else if (wordAlignmentFlag) { + int sourcePos = *(bestAlignment->alignedToT[ j ].begin()); + phraseTableFile << sourcePos << "-" << j << " "; + } } } else if (wordAlignmentFlag) { // alignment info in pb model