NLTK
Practical examples of natural language processing (NLP) like speech recognition, speech translation, understanding complete sentences, understanding synonyms of matching words, and writing complete grammatically correct sentences and paragraphs.
Benefits
- Search engines Google
- Social website feeds Facebook
- Speech engine Siri
open source Natural Language Processing (NLP) libraries
- Natural language toolkit (NLTK)
- Apache OpenNLP
- Stanford NLP suite
- Gate NLP library
pip3 install nltk
|
|
Tokenize Text Using Pure Python
crawl webpage
|
|
HTML
|
|
BS4
Count Word Frequency
calculate frequency using FreqDist()
|
|
freq
Screen Shot 2017-11-14 at 11.02.25 AM
Remove Stop Words Using NLTK
|
|
Screen Shot 2017-11-14 at 11.02.35 AM
Tokenize the text we got
use PunktSentenceTokenizer
|
|
stop
tokenize non-english languages text
|
|
finding synonyms wordnet (similar)
|
|
Screen Shot 2017-11-14 at 10.26.22 AM
finding synonyms wordnet (opposite)
|
|
Screen Shot 2017-11-14 at 10.27.22 AM
stemming word
|
|
stem non-english words
|
|
lemmatize words using word net (more accurate than stem)
|
|