Natural Language Processing (NLP) in Python
Fouad Trad
Machine Learning Engineer
Enables computers to analyze human language
import nltk
nltk.download('punkt_tab')
text = "NLP is fun. Let's dive into it!"
sentences = nltk.sent_tokenize(text)
print(sentences)
["NLP is fun.", "Let's dive into it!"]
text = "Claim your free prize now!"
words = nltk.word_tokenize(text)
print(words)
['Claim', 'your', 'free', 'prize', 'now', '!']
Natural Language Processing (NLP) in Python