Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Germann <Ulrich.Germann@gmail.com>2015-11-04 20:21:14 +0300
committerUlrich Germann <Ulrich.Germann@gmail.com>2015-11-04 20:21:14 +0300
commit3ad35a72ecd64ee0d9121a3f060b67dc45fe6ab3 (patch)
treeb26f20183ffc77728132cf86cc8b815071fba3ea /phrase-extract
parentb5d914134accaf5cdf39a94f61c581545e5803f6 (diff)
Missing parameter initialization; parentheses around bool assignments subsequently used as condition.
Diffstat (limited to 'phrase-extract')
-rw-r--r--phrase-extract/extract-main.cpp14
1 files changed, 7 insertions, 7 deletions
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, &lt);
wordNextOrient = getOrientWordModel(sentence, m_options.isWordType(), connectedLeftTopN, connectedRightTopN, endF, startF, endE, startE, 0, countF, -1, &lt, &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;
}