Word search within texts to find text that contains most matched variant

180 Views Asked by At

I want to find a way to find most suitable row from table which contains a word that is most similar to the word i'm entering. any idea? (I'm using OCR that finds words not exactly the same sometimes reads word 'specific' as 'spccific')

2

There are 2 best solutions below

1
On

Maybe you can use the SOUNDEX functionality (SQL Server) or SOUNDS LIKE (MySQL) if it is available with the SQL engine you are using.

1
On

If you are using Oracle then you can try UTL_MATCH which uses something known as the Levenshtein Distance to calculate the minimum number of edits to transform one string into another. Other systems may have something similar or you can use the alogrithm as a starting point for your own function.