diff options
author | Barry Haddow <barry.haddow@gmail.com> | 2011-11-21 14:49:26 +0400 |
---|---|---|
committer | Barry Haddow <barry.haddow@gmail.com> | 2011-11-21 14:49:26 +0400 |
commit | 3dc30fd51a77a7f4df1a213e182f7e69fd3b076a (patch) | |
tree | 2ba4619784f4aad43cec79fda4facc3215a421ac /moses-cmd | |
parent | c757e394946cd6cd6da2e4b2e88b1cccaa4759ae (diff) |
Remove direction from Phrase
Diffstat (limited to 'moses-cmd')
-rw-r--r-- | moses-cmd/src/LatticeMBR.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/moses-cmd/src/LatticeMBR.cpp b/moses-cmd/src/LatticeMBR.cpp index ef7a5f71a..c96d2794f 100644 --- a/moses-cmd/src/LatticeMBR.cpp +++ b/moses-cmd/src/LatticeMBR.cpp @@ -36,7 +36,7 @@ void extract_ngrams(const vector<Word >& sentence, map < Phrase, int > & allngr { for (int k = 0; k < (int)bleu_order; k++) { for(int i =0; i < max((int)sentence.size()-k,0); i++) { - Phrase ngram(Output, k+1); + Phrase ngram( k+1); for ( int j = i; j<= i+k; j++) { ngram.AddWord(sentence[j]); } @@ -403,7 +403,7 @@ const NgramHistory& Edge::GetNgrams(map<const Hypothesis*, vector<Edge> > & inco for (size_t start = 0; start < currPhrase.GetSize(); ++start) { for (size_t end = start; end < start + bleu_order; ++end) { if (end < currPhrase.GetSize()) { - Phrase edgeNgram(Output, end-start+1); + Phrase edgeNgram(end-start+1); for (size_t index = start; index <= end; ++index) { edgeNgram.AddWord(currPhrase.GetWord(index)); } @@ -434,8 +434,8 @@ const NgramHistory& Edge::GetNgrams(map<const Hypothesis*, vector<Edge> > & inco cerr << "edgeInNgram: " << edgeIncomingNgram << endl; } - Phrase edgeSuffix(Output, ARRAY_SIZE_INCR); - Phrase ngramSuffix(Output, ARRAY_SIZE_INCR); + Phrase edgeSuffix(ARRAY_SIZE_INCR); + Phrase ngramSuffix(ARRAY_SIZE_INCR); GetPhraseSuffix(edgeWords,back,edgeSuffix); GetPhraseSuffix(edgeIncomingNgram,back,ngramSuffix); |