在Golang中进行模糊字符串匹配

huangapple go评论136阅读模式
英文:

Fuzzy string matching in Golang

问题

有没有用于进行模糊字符串匹配的Go模块?如果我有一个字符串数组,我想要检查给定的字符串是否与数组中的任何元素模糊匹配。

请帮忙,谢谢。

英文:

Is there any go module for doing fuzzy string matching ?. If i have an array of strings, i want to check whether a given string fuzzy matches with any of the elements in the array.

Please Help
Thank You

答案1

得分: 6

你可能正在寻找一个实现Levenshtein距离算法的库。

这也是elasticsearch模糊搜索所使用的算法。

在这里可以找到一份Go包的列表。

英文:

You are probably looking for a library which implements Levenshtein Distance algorithm.

This is also the algorithm used by elasticsearch fuzzy searching.

See here a list of Go packages.

huangapple
  • 本文由 发表于 2014年1月8日 18:21:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/20992784.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定