How to tokenize tweets in python nltk ?
In this tutorial, You will learn how to tokenize tweets in python using nltk library.
In this program, we will use tweettokenizer from nltk library
from nltk.tokenize import TweetTokenizer
tknzr = TweetTokenizer()
s0 = "Great place! love to vist again @goa...."
result= tknzr.tokenize(s0)
print(result)
Output:
[‘Great’, ‘place’, ‘!’, ‘love’, ‘to’, ‘vist’, ‘again’, ‘@goa’, ‘…’]