nltk Getting started with nltk With NLTK


Example

You can use NLTK (especially, the nltk.tokenize package) to perform sentence boundary detection:

import nltk
text = "This is a test. Let's try this sentence boundary detector."
text_output = nltk.tokenize.sent_tokenize(text)
print('text_output: {0}'.format(text_output))

Output:

text_output: ['This is a test.', "Let's try this sentence boundary detector."]