nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Runtime / LevenshteinDistance

LevenshteinDistance

Full name Microsoft.VisualBasic.ComponentModel.Algorithm.DynamicProgramming.Levenshtein.LevenshteinDistance Assembly Microsoft.VisualBasic.Runtime Members 10

Levenshtein Edit Distance Algorithm for measure string distance

00 Remarks

http://www.codeproject.com/Tips/697588/Levenshtein-Edit-Distance-Algorithm

01 Syntax

Microsoft.VisualBasic.ComponentModel.Algorithm.DynamicProgramming.Levenshtein.LevenshteinDistance

02 Methods

NameOverloadsSummary
CreateTable 1 用于泛型的序列相似度比较
ComputeDistance 2 泛型序列的相似度的比较计算方法,这个会返回所有的数据
ComputeDistance 3 Implement the Levenshtein Edit Distance algorithm between string.
computeRouteImpl 1 计算lev编辑的变化路径
CreateTable 1
SaveMatch 1
Similarity 1

03 Members

method CreateTable #
CreateTable``1(``0(), ``0(), Cost(Of ``0), IEquals)

用于泛型的序列相似度比较

Type Parameters
NameDescription
T
Parameters
NameTypeDescription
reference``0()

-

hypotheses``0()

-

costCost(Of ``0)

-

equalsIEquals

泛型化的元素等价性的比较方法

method ComputeDistance overload 2 #
ComputeDistance``1(``0(), ``0(), IEquals, Double)

泛型序列的相似度的比较计算方法,这个函数返回的是距离

Type Parameters
NameDescription
T
Parameters
NameTypeDescription
reference``0()

-

hypotheses``0()

-

equalsIEquals

-

costDouble

-

method ComputeDistance #
ComputeDistance``1(``0(), ``0(), IEquals, ToChar(Of ``0), Double)

泛型序列的相似度的比较计算方法,这个会返回所有的数据

Type Parameters
NameDescription
T
Parameters
NameTypeDescription
reference``0()

-

hypotheses``0()

-

equalsIEquals

-

asCharToChar(Of ``0)

这个只是用于进行显示输出的

costDouble

-

method ComputeDistance #
ComputeDistance(Int32(), String, Double, IEquals)

Implement the Levenshtein Edit Distance algorithm between string.

Parameters
NameTypeDescription
referenceInt32()

The reference string ASCII cache.

hypothesesString

-

costDouble

-

method ComputeDistance overload 2 #
ComputeDistance(String, String, Double, IEquals)

The edit distance between two strings is defined as the minimum number of edit operations required to transform one string into another.

Remarks

(请注意,这函数是大小写敏感的。如果需要大小写不敏感,在使用前,请先将函数的两个字符串参数都转换为小写形式)

Parameters
NameTypeDescription
referenceString

-

hypothesesString

-

costDouble

-

method computeRouteImpl #
computeRouteImpl(String, DistResult, Int32, Int32, Double[0:,0:])

计算lev编辑的变化路径

Parameters
NameTypeDescription
hypothesesString

-

resultDistResult

-

iInt32

-

jInt32

-

distTableDouble[0:,0:]

-

method CreateTable #
CreateTable(T(), T(), Cost(Of T), GenericLambda(Of T))
method ComputeDistance overload 3 #
ComputeDistance(T(), T(), GenericLambda(Of T), LevenshteinDistance+ToChar(Of T), Double)
method SaveMatch #
SaveMatch(DistResult, String)
method Similarity #
Similarity(T(), T(), Double)