The function applies a rule to take a word as input and return a corresponding category, but there are some inputs where the rule does not hold.

