ALGORITHM - String similarity score/hash

后端 未结 8 1454
遇见更好的自我
遇见更好的自我 2021-02-01 10:16

Is there a method to calculate something like general \"similarity score\" of a string? In a way that I am not comparing two strings together but rather I get some number/scores

8条回答
  •  我在风中等你
    2021-02-01 10:37

    You might want to look at using a BK-Tree. Here is a discussion and python implementation.

    A BK-Tree stores strings in a tree, sorted by Levenshtein distance to the parent nodes. This is normally used to prune the search space when looking for similar strings, but it seems that this tree would form a natural ordering that could be used to create clusters.

提交回复
热议问题