AttributeError: ‘list’ object has no attribute ‘lower’ gensim

try:

data = [line.strip() for line in open("C:\corpus\TermList.txt", 'r')]
texts = [[word.lower() for word in text.split()] for text in data]

you were trying to apply .lower() to data, which is a list.
.lower() can only be applied to strings.

Leave a Comment