php : word proximity script?

前端 未结 3 925
臣服心动
臣服心动 2021-01-27 05:21

Okay - so, I\'ve spent ages searching in Google, and even went through a few specific searches at hotscripts etc., several php forums and this place ... nothing (not of use anyw

3条回答
  •  误落风尘
    2021-01-27 06:16

    I also thought of Hamming distance as Felix Kling commented. Maybe you can make some variant, where you encode your words into specific codewords and then check their distances through an array that holds your codewords.

    So if you have array[11, 02, 85, 37, 11], you can easily find that 11 has a maximum distance of 4 in this array.

    Don't know if this would work for you, but i think i would do it in a similar manner.

提交回复
热议问题