Quickly compare a string against a Collection in Java

前端 未结 3 2021
借酒劲吻你
借酒劲吻你 2020-12-18 06:42

I am trying to calculate edit distances of a string against a collection to find the closest match. My current problem is that the collection is very large (about 25000 item

3条回答
  •  感情败类
    2020-12-18 07:02

    Sounds like a BK-tree might be what you want. Here's an article discussing them: http://blog.notdot.net/2007/4/Damn-Cool-Algorithms-Part-1-BK-Trees. A quick Google yields some Java implementations.

提交回复
热议问题