Given a very large database of product names, how can you find potential typo in user searches and possible Can advise improvements
The user enters the "fork handle" and press 'search'.
They come back
"No result. Do you mean that the hand is handled?"
There are several ways to solve this problem:
- In your database, Keeping a table of strong> most popular misspellings if you want some common misspelling :)
- Use an algorithm based on : Information theory and In computer science, editing the distance between the two stars of letters is the number of operations required, to convert one of these to another, this metric To define or calculate a read, for example, many different algorithms.
- If you are using Lucene for full text search, which implies that the "Do you mean" feature is implemented.
- If you see that feature as a simple magic - improvement, here are some good, fewer implementations in many languages:
Comments
Post a Comment