How do you parse a paragraph of text into sentences? (perferrably in Ruby) How do you parse a paragraph of text into sentences? (perferrably in Ruby) ruby ruby

How do you parse a paragraph of text into sentences? (perferrably in Ruby)


Try looking at the Ruby wrapper around the Stanford Parser. It has a getSentencesFromString() function.


Just to make it clear, there is no simple solution to that. This is topic of NLP research as a quick Google search shows.

However, it seems that there are some open source projects dealing with NLP supporting sentence detection, I found the following Java-based toolset:

openNLP

Additional comment: The problem of deciding where sentences begin and end is also called sentence boundary disambiguation (SBD) in natural language processing.