Method Detail

newlineSplitter

Return a WordsToSentencesAnnotator that splits on newlines (only), which are then deleted.
This constructor counts the lines by putting in empty token lists for empty lines.
It tells the underlying splitter to return empty lists of tokens
and then treats those empty lists as empty lines. We don't
actually include empty sentences in the annotation, though. But they
are used in numbering the sentence. Only this constructor leads to
empty sentences.

Parameters:

nlToken - Zero or more new line tokens, which might be a \n or the fake
newline tokens returned from the tokenizer.

annotate

If setCountLineNumbers is set to true, we count line numbers by
telling the underlying splitter to return empty lists of tokens
and then treating those empty lists as empty lines. We don't
actually include empty sentences in the annotation, though.