我正在尝试使用支持向量机进行预测,但我收到了错误在执行代码的text_clf.fitsite-packages\sklearn\feature_extraction\text.py", line 232, in <lambda>
return lambda x: strip_accents(x.lower
most recent call last):File "/Users/asma/Desktop/q.py", line 13, in <module> AttributeError: 'numpy.ndarray' object has no attribute 'lower'import pandas as pd
import["hE
我看到的主要区别(我认为它可能会在每行创建有问题的numpy.ndarray,因为有多个列?)对于堆叠的那个,X_train有多个列。site-packages\sklearn\feature_extraction\text.py", line 256, in <lambda>AttributeError: 'numpy.ndarray' object has no attribute '
site-packages/sklearn/feature_extraction/text.py", line 232, in <lambda>AttributeError: 'numpy.ndarray' object has no attribute 'lower' 在这种情况下,我应该如何正确使用CountVectorizer?
我是这个领域的新手,我收到这个错误"AttributeError:'numpy.ndarray‘对象没有’lower‘属性“reviews = pd.read_csv("/contentlocal/lib/python3.6/dist-packages/keras_preprocessing/text.py in text_to_word_sequence(text, filters, lo
in <module>File "stop2.py", line 10, in preprocessAttributeError: 'file' object has no attribute 'lower'# -*- coding: utfRegexpTokenizer
from nltk.corpus import
我面临这个属性错误,如果在tweet.The流tweet中出现的浮点值必须被更低的大小写和标记化,那么我就无法处理浮点值,所以我使用了split函数。module>()----> 2 negfeats = [(word_feats(x for x in p_test.SentimentText[f].lowerstop_words), 'neg') for f in l]
3 posfeats = [(word_feats(x for x in p_test.Sen