classSimpleWordFormsProvider:defget_word_forms(self,word):result=[]lower_word=word.lower()# Assume the input word is plural, add singular formsiflen(word)>3andlower_word.endswith("ies"):result.append(word[:-3]+"y")iflen(word)>2andlower_word.endswith("es"):result.append(word[:-2])iflen(word)>1andlower_word.endswith("s"):result.append(word[:-1])# Assume the input word is singular, add plural formsiflen(word)>1andlower_word.endswith("y"):result.append(word[:-1]+"ies")eliflower_word.endswith(("s","x","ch","sh")):result.append(word+"es")else:result.append(word+"s")returnresult