The rule implemented by the function is to categorize words into different groups or types.

