The function f(x) assigns a numerical value to each input string. The assigned value depends on the string itself.

