Similar String algorithm

后端 未结 9 1411
梦如初夏
梦如初夏 2020-11-29 20:10

I\'m looking for an algorithm, or at least theory of operation on how you would find similar text in two or more different strings...

Much like the question posed he

9条回答
  •  甜味超标
    2020-11-29 20:45

    You might want to look into the algorithms used by biologists to compare DNA sequences, since they have to cope with many of the same things (chunks may be missing, or have been inserted, or just moved to a different position in the string.

    The Smith-Waterman algorithm would be one example that'd probably work fairly well, although it might be too slow for your uses. Might give you a starting point, though.

提交回复
热议问题