Algorithm to calculate how much of text A is in text B? -


i need calculate how of block of text (a) in block of text (b). simple algorithms soundex aren't providing great results me text b has additional text within isn't/shouldn't in text a, throws figures off. need ensure percentage of a within b, , ignore additions b.

my first thought simple algorithm might work in case split a sentences, note total number of sentences, search b instance of each sentence provide percentage. while should work feels quite hacky, , i'm sure more intelligent has devised algorithm provide better calculation on similar principle.

longest common subsequence looks best suited purposes.


Comments

Popular posts from this blog

Eclipse formatter for java ending braces -

ruby - Nesting modules inside of a Rails eninge gem -

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -