I am looking to design a search box that will take any input and return the most appropriate output from a chosen list of outputs.
As an example, my chosen list of outputs are animal
,vehicle
and place
.
If the user searches for cat
, I would like the code to run cat
vs animal
,vehicle
and place
. A correlation/matching score will be determined for each. With animal
generating the highest correlation. The output will then be animal
.
Similarly, typing in car
, will output vehicle
from the list.
Any ideas on what is the best way to generate this correlation score? My output list consists of 100 different terms.