在MySQL中Damerau-Levenshtein距离算法函数 [英] Damerau–Levenshtein distance algorithm in MySQL as a function

查看:1078
本文介绍了在MySQL中Damerau-Levenshtein距离算法函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道一个MySQL的执行Damerau - 莱文斯坦距离算法作为一个存储过程/函数,它接受一个单一指定的字符串作为参数,并查找字符串的模糊匹配在某一特定领域的特定表中?< BR>
我发现,比较两个指定的字符串,工作了距离,但首先这仅仅是莱文斯坦距离算法,而不是Damerau - 莱文斯坦之一,其次,我不是找各种过程/函数code例子我的选择是类似于我指定字符串的领域比较两个字符串,但发现模糊匹配。

我基本上是试图把一个关键字模糊搜索MySQL中。

Does anyone know of a MySQL implementation of the Damerau–Levenshtein distance algorithm as a stored procedure/function that takes a single specified string as a parameter and looks for fuzzy matches of the string in a particular field within a particular table?

I have found various procedure/function code examples that compares two specified strings and works out the distance, but firstly this is only the Levenshtein distance algorithm, and not the Damerau–Levenshtein one, and secondly, I'm not looking to compare two strings but find fuzzy matches in a field of my choosing that are similar to my specified string.

I'm basically trying to put together a fuzzy keyword searcher in MySQL.

推荐答案

MySQL的莱文斯坦和Damerau - 莱文斯坦UDF的你有这种算法的几种实现。

In MySQL Levenshtein and Damerau-Levenshtein UDF’s you have several implementations of this algorithm.

这篇关于在MySQL中Damerau-Levenshtein距离算法函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆