java - Getting percentage of similarity of two texts -
i need score of similarity between texts, when 1 inside second.
for example:
text1: aaa bbb ccc ddd eee text2: bbb ccc
i need somethig me, text2 100% inside text1. there way this?
depending on want may try
- length of longest common subsequence of both texts divided length of text2
- or length of longest contiguous subsequence of both texts divided length of text2
both give 1 if text inside text1 , 0 if not share common character.
Comments
Post a Comment