Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I want to search 50% to 80% similar text from a database column.

The rows of that particular column has contained lots of paragraph text. From this text

I need to find out which are all the rows has similar text in that particular column.

If required, then use function.
Posted
Updated 16-May-15 3:20am
v2
Comments
Tomas Takac 15-May-15 10:51am    
Homework? Show what you have tried so far. Explain where you are stuck.
Sergey Alexandrovich Kryukov 15-May-15 13:40pm    
Define "similarity". This is very non-trivial issue, something which is very hard to define. Example is not a definition, of course.
—SA

Don't do it in SQL.
SQL string handling is - at best - pretty basic.

And what you want to do is pretty complicated.
Seriously: This is overkill for your purposes, probably, but it's an advanced form of what you are asking for: Levenshtein Edit Distance Algorithm[^]

Do this in your "real" programming language, whichever that is. SQL is a poor choice.
 
Share this answer
 
Comments
Maciej Los 15-May-15 11:32am    
5ed!
Yes, OriginalGriff is right, but you may want to know a bit more about text similarity algorithms.

Please, follow below links:
Pattern Matching: the Gestalt Approach[^]
Simil: An algorithm to look for similar strings[^]
Text similarity algorithm - solution 2[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900