The function takes a word as input and applies a different numerical value to each word based on some rule.

