Similar String algorithm

后端 未结 9 1406
梦如初夏
梦如初夏 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:36

    There's another way. Pattern recognition using convolution. Image A is run thru a Fourier transform. Image B also. Now superimposing F(A) over F(B) then transforming this back gives you a black image with a few white spots. Those spots indicate where A matches B strongly. Total sum of spots would indicate an overall similarity. Not sure how you'd run an FFT on strings but I'm pretty sure it would work.

提交回复
热议问题