diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-06-28 21:06:36 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-06-28 21:06:36 +0400 |
commit | 600a188a4e49e176d469848123d0b0b3f00f368b (patch) | |
tree | 205815e7f3af424c96b13b726be693508194628c /moses/TranslationOptionCollectionText.cpp | |
parent | bddbdeec0448eabd260bb034262d53990846482e (diff) |
beautify
Diffstat (limited to 'moses/TranslationOptionCollectionText.cpp')
-rw-r--r-- | moses/TranslationOptionCollectionText.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/moses/TranslationOptionCollectionText.cpp b/moses/TranslationOptionCollectionText.cpp index 0ef777c03..ae1162e36 100644 --- a/moses/TranslationOptionCollectionText.cpp +++ b/moses/TranslationOptionCollectionText.cpp @@ -38,23 +38,23 @@ TranslationOptionCollectionText::TranslationOptionCollectionText(Sentence const size_t size = input.GetSize(); m_targetPhrasesfromPt.resize(size); for (size_t startPos = 0; startPos < size; ++startPos) { - std::vector<InputLatticeNode> &vec = m_targetPhrasesfromPt[startPos]; - for (size_t endPos = startPos; endPos < size; ++endPos) { - Phrase subphrase(input.GetSubString(WordsRange(startPos, endPos))); - WordsRange range(startPos, endPos); - InputLatticeNode node(subphrase, range); - - vec.push_back(node); - } + std::vector<InputLatticeNode> &vec = m_targetPhrasesfromPt[startPos]; + for (size_t endPos = startPos; endPos < size; ++endPos) { + Phrase subphrase(input.GetSubString(WordsRange(startPos, endPos))); + WordsRange range(startPos, endPos); + InputLatticeNode node(subphrase, range); + + vec.push_back(node); + } } for (size_t phaseSize = 1; phaseSize <= size; ++phaseSize) { - for (size_t startPos = 0; startPos < size - phaseSize + 1; ++startPos) { - size_t endPos = startPos + phaseSize -1; - //cerr << startPos << "-" << endPos << "=" << GetPhrase(startPos, endPos) << endl; - InputLatticeNode &node = GetInputLatticeNode(startPos, endPos); - m_phraseDictionaryQueue.push_back(&node); - } + for (size_t startPos = 0; startPos < size - phaseSize + 1; ++startPos) { + size_t endPos = startPos + phaseSize -1; + //cerr << startPos << "-" << endPos << "=" << GetPhrase(startPos, endPos) << endl; + InputLatticeNode &node = GetInputLatticeNode(startPos, endPos); + m_phraseDictionaryQueue.push_back(&node); + } } } |