The function seems to apply a rule where it maps the input words to specific geographic regions or continents.

