In some embodiments, a method includes receiving a token that is usable in
search queries for data in a database. The database includes items of
data that are represented by data strings. The method also includes
determining a synonym candidate for the token. The method includes adding
the synonym candidate as a synonym for the token into an expansion
dictionary in response to a determination that the number of data strings
having the synonym candidate exceeds a threshold.