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

github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/corpus_nbest.cpp')
-rw-r--r--src/data/corpus_nbest.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/data/corpus_nbest.cpp b/src/data/corpus_nbest.cpp
index d5a48d8d..8029d351 100644
--- a/src/data/corpus_nbest.cpp
+++ b/src/data/corpus_nbest.cpp
@@ -43,7 +43,7 @@ SentenceTuple CorpusNBest::next() {
pos_++;
// fill up the sentence tuple with sentences from all input files
- SentenceTuple tup(curId);
+ SentenceTupleImpl tup(curId);
std::string line;
lastLines_.resize(files_.size() - 1);
@@ -74,9 +74,10 @@ SentenceTuple CorpusNBest::next() {
if(cont && std::all_of(tup.begin(), tup.end(), [=](const Words& words) {
return words.size() > 0 && words.size() <= maxLength_;
}))
- return tup;
+ return SentenceTuple(tup);
}
- return SentenceTuple(0);
+
+ return SentenceTuple();
}
void CorpusNBest::reset() {