You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@opennlp.apache.org by Sam Li <sa...@gmail.com> on 2011/06/26 13:17:00 UTC

preserving newline when using sentence detector

How does one preserve newline characters when detecting sentences?

I want to be able to join sentences in a certain way (placing joined sentences in a array) but at the same time I want to preserve their newline characters so that when I print the joined sentence array out, it will look somewhat like the original.

Thanks!

-Sam

Re: preserving newline when using sentence detector

Posted by Jörn Kottmann <ko...@gmail.com>.
On 6/26/11 1:17 PM, Sam Li wrote:
> How does one preserve newline characters when detecting sentences?
You can keep the original text string and let the sentence detector return
a span array, the spans identify the individual sentences.

Does that answer your question? Otherwise I might have misunderstood you.

Jörn