Hi, all,
Thanks very much for all your replies.Learned a lot from you guys.
I have two files,each of them is sentences.For example file1 has sentences:
A C D E G F D
C B F D E A
A A C F D B A
file2 has sentences:
A C D
F D B
F D D
the result would be for each of the sentence in file 1 matching each of the sentence in file 2, return the longest common substring and their index on a word level between the two sentences.
RESULT:
for sentence 1 in file 1
LCS :A C D
0,3 F D
5,6 F D
5,6
Original Sentence:A C D E G F D
sentence 2 in file 1
LCS :A
5,5 C
0,0 D
3,3 F D
3,4 F D
3,4
Original Sentence:C B F D E A
sentence 3 in file 1
LCS :A C
1,2 F D B
3,5 F D
3,4
Original Sentence:A A C F D B A
So is there any way to make this process more efficiency?