I am looking for an algorithm to create Czech adverbs when given an adjective. I was looking for a decent set of rules, but I was not able to find anything comprehensive. Going from example words I have the following rules - in Python code, but it should be easy to understand even for nonprogrammers. So for example if a word ends with "lý", the last character is replaced with an e (resulting in "le").
def adjective_to_adverb(word: str) -> str:
if word.endswith("lý") or word.endswith("sý"):
return word[:-1] + "e"
elif word.endswith("rý"):
return word[:-2] + "ře"
elif word.endswith("í"):
return word[:-1] + "ě"
elif word.endswith("cký"):
return word[:-2] + "ky"
elif word.endswith("ký"):
return word[:-2] + "ce"
elif word.endswith("ý"):
return word[:-1] + "ě"
else:
raise ValueError(f"Adjective {word} does not end in a known suffix")
I think my rules are incomplete. What other cases would I need to handle?