Tag: sentiment analysis

用于情感分析的NaiveBayesClassifier培训

我正在Python中使用句子来训练NaiveBayesClassifier ,它给了我下面的错误。 我不明白这个错误是什么,任何帮助都是好的。 我已经尝试了许多其他input格式,但错误仍然存​​在。 代码如下: from text.classifiers import NaiveBayesClassifier from text.blob import TextBlob train = [('I love this sandwich.', 'pos'), ('This is an amazing place!', 'pos'), ('I feel very good about these beers.', 'pos'), ('This is my best work.', 'pos'), ("What an awesome view", 'pos'), ('I do not like this restaurant', 'neg'), ('I am tired […]