The function maps words to categories based on their meaning.
