From 3ad35a72ecd64ee0d9121a3f060b67dc45fe6ab3 Mon Sep 17 00:00:00 2001 From: Ulrich Germann Date: Wed, 4 Nov 2015 17:21:14 +0000 Subject: Missing parameter initialization; parentheses around bool assignments subsequently used as condition. --- phrase-extract/extract-main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'phrase-extract') diff --git a/phrase-extract/extract-main.cpp b/phrase-extract/extract-main.cpp index 328a33a25..e439bc934 100644 --- a/phrase-extract/extract-main.cpp +++ b/phrase-extract/extract-main.cpp @@ -446,8 +446,8 @@ void ExtractTask::extract(SentenceAlignment &sentence) wordPrevOrient = getOrientWordModel(sentence, m_options.isWordType(), connectedLeftTopP, connectedRightTopP, startF, endF, startE, endE, countF, 0, 1, &ge, <); wordNextOrient = getOrientWordModel(sentence, m_options.isWordType(), connectedLeftTopN, connectedRightTopN, endF, startF, endE, startE, 0, countF, -1, <, &ge); orientationInfo += getOrientString(wordPrevOrient, m_options.isWordType()) + " " + getOrientString(wordNextOrient, m_options.isWordType()); - if(m_options.isAllModelsOutputFlag()) - " | | "; + // if(m_options.isAllModelsOutputFlag()) + // " | | "; } addPhrase(sentence, startE, endE, startF, endF, orientationInfo); } @@ -459,7 +459,7 @@ void ExtractTask::extract(SentenceAlignment &sentence) if(buildExtraStructure) { // phrase || hier string orientationInfo = ""; - REO_POS wordPrevOrient, wordNextOrient, phrasePrevOrient, phraseNextOrient, hierPrevOrient, hierNextOrient; + REO_POS wordPrevOrient=UNKNOWN, wordNextOrient=UNKNOWN, phrasePrevOrient, phraseNextOrient, hierPrevOrient, hierNextOrient; for(size_t i = 0; i < inboundPhrases.size(); i++) { int startF = inboundPhrases[i].first.first; @@ -560,13 +560,13 @@ REO_POS getOrientPhraseModel (SentenceAlignment & sentence, REO_MODEL_TYPE model return UNKNOWN; connectedLeftTop = false; for(int indexF=startF-2*unit; (*ge)(indexF, zero) && !connectedLeftTop; indexF=indexF-unit) - if(connectedLeftTop = (it = inBottomRight.find(startE - unit)) != inBottomRight.end() && - it->second.find(indexF) != it->second.end()) + if ((connectedLeftTop = ((it = inBottomRight.find(startE - unit)) != inBottomRight.end() && + it->second.find(indexF) != it->second.end()))) return DRIGHT; connectedRightTop = false; for(int indexF=endF+2*unit; (*lt)(indexF, countF) && !connectedRightTop; indexF=indexF+unit) - if(connectedRightTop = (it = inBottomLeft.find(startE - unit)) != inBottomLeft.end() && - it->second.find(indexF) != it->second.end()) + if ((connectedRightTop = ((it = inBottomLeft.find(startE - unit)) != inBottomLeft.end() && + it->second.find(indexF) != it->second.end()))) return DLEFT; return UNKNOWN; } -- cgit v1.2.3