in reply to Re^2: Search for identical substrings
in thread Search for identical substrings
The problem is that the "LCS" in Algorithm::Diff is Longest Common Sub-Sequence, but for your requirements you need Longest Common String.
The difference being the latter is contiguous, whilst the former is not (need not be).
You're after this?
P:\test>lcs "banana is split" "banana..s split" banana is split banana..s split s split
I'm still verifying my algorithm is correct, but so far it appears to be about 10x quicker than the XS version of LCSS despite being pure perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Search for identical substrings
by bioMan (Beadle) on Aug 19, 2005 at 16:50 UTC |