引发FormatError('无法自动检测给定的格式'

时间:2019-02-04 15:34:25

标签: python nlp text-classification textblob

我想使用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

enter image description here

0 个答案:

没有答案