Skip to main content
2 votes

Confused by NLTK

You are right, this is confusing and it's not in the documentation. Since you are new in Object Oriented Programming, I'll try to explain it as simple as I can. In OOP, the main difference from a non-...
ChrisG's user avatar
  • 7,396
1 vote

Smile/Analyzer always return 0

tokenize returns a list, therefore tokens is a list from tokens = tokenizer.tokenize(text). Even if text is only one word. If text is 'cat', tokens is ['cat']. This if tokens==self.Pos[A]: can never ...
DinoCoderSaurus's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible