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

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -