Click here to Skip to main content
15,886,823 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am stuck in a such scenario where I have to match the words with a string that doesn't contains any pattern and calculate matching percentage.
For Ex:,


Search termString to match
1) I have lots of work.1) There is no work to complete now days.
2) I am working at a such a place where it is hard to find single person for a week. 2) I am working.



Please show me some way...!
Posted
Updated 17-Nov-14 4:44am
v2
Comments
BillWoodruff 17-Nov-14 9:45am    
Unclear: what is the difference in the way in which "Search term" is used compared to "String to match" ?

What does "percentage" mean here ?

Show us a "successful" example of a match and a calculated percentage ?
Member 7695634 17-Nov-14 10:10am    
I have to match words in the first column sentence with the second column sentence and calculate the matching percentage. For ex, in the first sentence only "work" is the matching word in both the sentence.
BillWoodruff 17-Nov-14 12:38pm    
So, given "I am working" is the match in the second example how do you calculate a percentage: a percentage of what ?

Do you take the match string and the length of the text it occurs in and compute some ratio ?
ZurdoDev 17-Nov-14 10:17am    
Click Improve question and show us the code you have so far and where you are stuck.

1 solution

Years ago i have asked similar question: Text similarity algorithm[^].
Please, read it.
 
Share this answer
 
Comments
Manas Bhardwaj 18-Nov-14 6:54am    
I liked the old question :) +5!
Maciej Los 18-Nov-14 7:02am    
Thank you, Manas ;)

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