Splitting text into sentences
Revision as of 12:46, 16 March 2011 by Aymeric Mansoux (talk | contribs) (Created page with "<source lang="python"> from nltk.tokenize import sent_tokenize print sent_tokenize("I read J.D. Salinger in High School. He wrote 'Catcher in the Rye'.") </source> ['I read J.D...")
from nltk.tokenize import sent_tokenize
print sent_tokenize("I read J.D. Salinger in High School. He wrote 'Catcher in the Rye'.")
['I read J.D.', 'Salinger in High School.', "He wrote 'Catcher in the Rye'."]
So you can see it's not perfect.