Hi,
I am trying to parse_data_from_file function. I think it asks me to select every sentence from the file and for every sentence exclude the stop words. Here is my code, it gives me the error:
The csv file consists of 2 columns. The label (category in the header) is in the 0th column and text is in 1st column.
As part of parsing the file, you should return a tuple of sentences and labels from the function.
For each row in the csv file:
Add the label as is to the list of labels.
Remove stopwords from the text and then add it to sentences.
The writeup in the assignment is detailed. If you’re having trouble with this, see the Expected Output section to see what the labels are.
Hi Balaji.ambresh,
Thank you. I understand it now.
So I am trying to append labels and sentences list, which are initialized by [ ], by each label and sentence (after removed stop words). But I encounter an error saying None type has no append method?
I have attached my code below for your convenience. I will delete it afterward.
Also, I wonder if the next() method–skipping the first row is right.
Would you please take a look again? Thank you.