首页  

字符串编辑距离 Levenstein edit distance     所属分类 tech 浏览量 927
字符串编辑距离

Levenstein edit distance 


An algorithm for measuring the difference between two character sequences.
This is the number of changes needed to change one sequence into another, 
where each change is a single character modification (deletion, insertion or substitution).


编辑距离是针对二个字符串(例如英文字)的差异程度的量化量测
量测方式是看至少需要多少次的处理才能将一个字符串变成另一个字符串

自然语言处理
拼写检查可以根据一个拼错的字和其他正确的字的编辑距离,判断哪一个(或哪几个)是比较可能的字

生物信息学
判断二个DNA的类似程度

lucene-suggest-4.9.1.jar
org.apache.lucene.search.spell.LevensteinDistance


org.apache.commons.lang3.StringUtils.getLevenshteinDistance(CharSequence, CharSequence)
public static int getLevenshteinDistance(CharSequence s, CharSequence t)

commons-text
 
https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/similarity/LevenshteinDistance.html



https://gitee.com/dyyx/hellocode/blob/master/src/distance/LevensteinDistance.java

上一篇     下一篇
Map computeIfAbsent 实例

励志歌曲系列

jdk16 ZGC 改进

最简单的RPC框架实例

aerospike lua 构建有序列表

接口幂等几种实现