I want to know how does the "Did you mean : ..." of Wikipedia works and if there's a way, like with the API, to use it? Because I want to get the corresponding page from my input but this one could include errors. Example . Is there a query that returns directly the suggestion?
Thank you for your help.
(I am not sure of Wikipedia's implementation details, but this is one way to do it)
It probably uses a phonetic algorithm, such as Soundex and matches it against a precomputed database.
PHP offers some phonetic algorithms built in if you want to play with them.
This comes under "information retrieval" in computer science. Lucene is the open source library implementing these concepts and could be the library you are looking for. For more details on information retrieval you can search Google. For specifics on how "Did you mean" can be implemented using Lucene, go through the below links
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With