richliao / textClassifier

Text classifier for Hierarchical Attention Networks for Document Classification
Apache License 2.0
1.07k stars 379 forks source link

AttributeError: 'DataFrame' object has no attribute 'review' #34

Open mowangshao opened 5 years ago

mowangshao commented 5 years ago

Using TensorFlow backend. (111, 1) Traceback (most recent call last): File "textClassifierHATT.py", line 55, in for idx in range(data_train.review.shape[0]): File "/root/anaconda3/envs/py2/lib/python2.7/site-packages/pandas/core/generic.py", line 3081, in getattr return object.getattribute(self, name) AttributeError: 'DataFrame' object has no attribute 'review'

mowangshao commented 5 years ago

for idx in range(data_train.review.shape[0]): text = BeautifulSoup(data_train.review[idx]) I find there are many attribute 'review' is used but I can not find the 'review' in google. How can I solve the problem?

mowangshao commented 5 years ago

Em, I use the tensorflow-cpu version.

mowangshao commented 5 years ago

I fixed this problem. Just use wget https://raw.githubusercontent.com/MatthieuBizien/Bag-popcorn/master/labeledTrainData.tsv to replace wget https://www.kaggle.com/c/word2vec-nlp-tutorial/download/labeledTrainData.tsv.