I am working on a script to extract relevant tags from the text file which i converted from a URL. One part of the script is giving me error when i apply stemmer, the code is as below
def __call__(self, tag):
'''
@param tag: the tag to be stemmed
@returns: the stemmed tag
'''
string = self.preprocess(tag.string)
tag.stem = self.stemmer.stem(string)
return tag
the error is as below
Type Error - stem() missing 1 required positional argument : 'word'
the line causing the error is
tag.stem = self.stemmer.stem(string)
I am using Python, if anyone can help me to modify the code to get rid of the error please.