i want to build a class that can automaticly doing some text preprocessing when input a text string, the variable of what I'm input is docs_new
class prepro():
def __init__(self):
pass
def low(self,docs_new):
lower_case = docs_new.lower()
first i build a class that can process it but, i know its wrong right? so how to make the .lower() work on a docs_new when docs_new is a list.
docs_new = [input('input a text: ')]
new_tfidf= tfidf.transform(prepro.lower_case) -> i know this code of a line is wrong.
featureselection= selection.transform(x_newtfidf)
predicted = classifier.predict(featureselection)
print(predicted)
when i input a text its error
AttributeError: type object 'prepro' has no attribute 'lower_case'
here i want to Input a text then i want the docs_new doing automatic prepro whitin class called preproand how should i code it? thank you