How can I measure similarity-percentage between two sequences of strings?
I have two text files and In files there sequences are written like
First file:
AAA BBB DDD CCC GGG MMM AAA MMM
Second file:
BBB DDD CCC MMM AAA MMM
How to measure similarity between these two files in terms of order of strings?
For example in above example both files have similarity due to order of strings is same however some strings are missing in file-2. What algorithm is best suitable to solve this problem so that I can measure how similar is order of strings not frequency of strings in two?