Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/326.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 是否可以扩充现有的TextBlob分类器?_Python_Nlp_Sentiment Analysis_Textblob - Fatal编程技术网

Python 是否可以扩充现有的TextBlob分类器?

Python 是否可以扩充现有的TextBlob分类器?,python,nlp,sentiment-analysis,textblob,Python,Nlp,Sentiment Analysis,Textblob,我想使用比TextBlob提供的大多数开箱即用分类器,但我还想添加我自己的一小部分训练数据。这是因为我正在分析的文本中有一些合适的词,我想确保它进入训练集中 所以,在TextBlob中,他们说可以像这样扩展现有的分类器 >>> new_data = [('She is my best friend.', 'pos'), ("I'm happy to have a new friend.", 'pos'), ("Stay thirsty, my f

我想使用比TextBlob提供的大多数开箱即用分类器,但我还想添加我自己的一小部分训练数据。这是因为我正在分析的文本中有一些合适的词,我想确保它进入训练集中

所以,在TextBlob中,他们说可以像这样扩展现有的分类器

>>> new_data = [('She is my best friend.', 'pos'),
        ("I'm happy to have a new friend.", 'pos'),
        ("Stay thirsty, my friend.", 'pos'),
        ("He ain't from around here.", 'neg')]
>>> cl.update(new_data)
True
>>> cl.accuracy(test)
1.0
但是,它并没有说明如何将这些数据添加到默认分类器中。有人知道这是否可能吗

编辑

或者,是否有一个地方可以让我获得足够的训练数据,以便我可以反过来训练分类器