我想使用textblob训练我的数据集。所以我实现了
from textblob.classifiers import NaiveBayesClassifier
with open('train.csv', 'r') as fp:
cl = NaiveBayesClassifier(fp)
但是我遇到了错误
raise FormatError('Could not automatically detect format for the given '
textblob.exceptions.FormatError: Could not automatically detect format for the given data source.
我找不到此错误的解决方案。有人可以提出任何解决方案的建议吗? (我的数据集就像)
review1, category1
"review2", category2