The function maps each input string to a corresponding numerical value based on some criteria.
