Wednesday, 13 December 2017

NLTK in Python

Hi All,



Natural Language Toolkit (NLTK)
NLTK is a leading programming platform for building Python programs to work with human language data itms. It provides easy-to-use interfaces along with a suite of text processing libraries for classification, tokenization, stemming, tagging, parsing, and semantic reasoning, wrappers for industrial-strength NLP libraries etc
Some simple things you can do with NLTK
Tokenize and tag some text data:
>>> import nltk
>>> sentence = """At eight o'clock on Thursday morning
... Arthur didn't feel  good."""
>>> tokens = nltk.word_tokenize(sentence)
>>> tokens
['At', 'eight', "o'clock", 'on', 'Thursday', 'morning',
'Arthur', 'did', "n't", 'feel', 'very',  '.']

No comments:

Post a Comment