i have a list of stopwords (in German) that i want to use to Filter out the same ones from an input Text, it looks like this:
stopwortlist = ['ab', 'aber','abgesehen', 'alle', 'allein', 'aller', 'alles']
text = input('please put in a Text')
#i have found a way of controlling them online, but it doesnt quite work,
#cause it gives out a list, and all i want is a text (where the words from
#the list are filtered out
def filterStopwords (eingabeText, stopwords):
out = [word for word in eingabeText if word not in stopwords]
return out;
how should i modify the function to get my Result ? thanks a lot in Advance