There was a bug in KAFDocument.getSentences() method. They were not always returned in order.