Skip to content

Instantly share code, notes, and snippets.

View morteza's full-sized avatar
🍱

Morteza Ansarinia morteza

🍱
  • Luxembourg
View GitHub Profile
@japerk
japerk / nltk_tokenize_tag_chunk.rst
Created February 25, 2012 16:36
NLTK Tokenization, Tagging, Chunking, Treebank

Sentence Tokenization

>>> from nltk import tokenize
>>> para = "Hello. My name is Jacob. Today you'll be learning NLTK."
>>> sents = tokenize.sent_tokenize(para)
>>> sents
['Hello.', 'My name is Jacob.', "Today you'll be learning NLTK."]