tokens = self.tokenizer.tokenize(text)
I have the same code as in the walkthrough, yet I'm getting the error in the title.
CS50 Stack Exchange is a question and answer site for students of Harvard University's CS50. It only takes a minute to sign up.Sign up to join this community
You don't have a "thing" named tokenizer. Review the hints section of the spec:
Odds are you’ll find
nltk.tokenize.casual.TweetTokenizerof interest, which can be used to tokenize a tweet (i.e., split it up into a list of words) with code like:
tokenizer = nltk.tokenize.TweetTokenizer() tokens = tokenizer.tokenize(tweet)