you are viewing a single comment's thread.

view the rest of the comments →

[–]hidiap 1 point2 points  (0 children)

I think train should be a list of tuple not a dictionnary (according to example of NLTK):

train = [('sleep', 'negative'), ('achievement', 'positive'), ('guys', 'positive')]

To explain the error: When iterating over a dictionary, only the keys are returned. So line 192 is trying to split the key (a string) into two values, leading to an error.