c# - 计算更改操作 c#

标签 c# .net

我有一个执行一些基本词法分析的应用程序,我正在寻找一种有效的方法来计算将一个单词转换为另一个单词所需的更改操作的数量,一个字符一个字符地更改。

在此先感谢大家。

最佳答案

这听起来很像 Levenshtein Distance

The Levenshtein distance between two strings is defined as the minimum number of edits needed to transform one string into the other, with the allowable edit operations being insertion, deletion, or substitution of a single character

文章还链接到其他比较算法。

关于c# - 计算更改操作 c#,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3236081/

相关文章:

c# - 按元素选择最重复的项目

C# ListView SelectAll 选择颜色

c# - 使用 JIRA SDK 设置时间值(特别是 OriginalEstimate)

c# - 将类型 `System.Collections.IEnumerator` 转换为 `System.Collections.Generic.IEnumerator`

javascript - 生成带有隐藏输入的表单并提交到操作

c# - 在 C# 中将日期时间转换为儒略日期(ToOADate 安全吗?)

c# - query.wait 没有完成

c# - 我可以从 C# 中同一类的另一个构造函数调用重载的构造函数吗?

.net - ImageBrush 可以多线程工作吗?

c# - 如何限制 SSH.NET 的上传速度?