How to tokenize tweets in python nltk ?

Spread the love

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)


[‘Great’, ‘place’, ‘!’, ‘love’, ‘to’, ‘vist’, ‘again’, ‘@goa’, ‘…’]



Leave a Reply

Your email address will not be published. Required fields are marked *