... like the search term.
Levenshtein: Allows for typos and matches to words that are 1 or 2 letters mistyped.
Grammar: Account for singular/plural, past/present, and noun/adjective/verb forms.
Referencing: ...
... values.
Additional
Note how this also picked up typos in the 4th value which is good as I didn't want to overcomplicate things using LEVENSHTEIN and DIFFERENCE:
SOUNDEX('Data Not Yet Available') ...
... instead of spot on).
$didyoumean_words_array=array();
foreach ($terms as $term) {
$term=strtolower($term);
# get closest word by LEVENSHTEIN
$shortest = -1;
foreach ($levenshtein_words as ...
We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies. Read more about our Privacy Policy.