def get_documents(self, rows): documents = [] parser = pm() for row in rows: document = " ".join(row[1:]) words = parser.get_words_main(document) documents.append(words) # print words return documents
def get_documents(self): parser = pm() self.documents = [] for row in self.rows: # document = " ".join(row[1:]) for document in row[1:]: ## document is each column (cf: in dictionary document is each article) words = parser.get_words_main(document) self.documents.append(words) # print words return self.documents