sentences.add(toSentence(posSample));
chunks++;
}
if (sentences.size() > 0)
return new SentenceSample(detokenizer,
sentences.toArray(new String[sentences.size()][]));
else if (posSample != null)
return read(); // filter out empty line
else {
return null; // last sample was read