问题描述
我想运行Levenshtein,但速度更快,因为它是我正在构建的实时应用程序。它可以在距离大于10时终止。
I want to run the Levenshtein, but WAY faster because it's real time application that I'm building. It can terminate once the distance is greater than 10.
推荐答案
度量允许添加,删除或替换操作。如果您正在寻找更快但不太精确的指标,可以使用(允许只有添加和删除)甚至(仅允许替换)。
The Levenshtein distance metric allows addition, deletion or substitution operations. If you're looking for a faster but less precise metric you can use the longest common subsequence (allows only addition and deletion) or even the Hamming distance (allows only substitution).
但是,我建议您尝试优化Levenshtein距离算法,因为它可以获得最佳效果。
However, I recommend that you try to optimize your Levenshtein distance algorithm instead as it gives the best results.
这篇关于对于弦距,是否有比Levenshtein更快(更不精确)的算法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!