完成.下面是最终通过我所有测试的代码.再次,这是模仿Murilo Vasconcelo的Steve Hanov算法的修改版本.感谢所有帮助!
/**
* Computes the minimum Levenshtein Distance between the given word (represented as an array of Characters) and the
* words stored in theTrie. This algorithm is modeled after Steve Hanov's blog article "Fast and Easy Levenshtein
* distance using a Trie" and Murilo Vasconcelo's revised version in C++.
*
* http://stevehanov.ca/blog/index.php?id=114
* http://murilo.wordpress.com/2011/02/01/fast-and-easy-levenshtein-distance-using-a-trie-in-c/
*
* @param ArrayList<Character> word - the characters of an input word as an array representation
* @return int - the minimum …Run Code Online (Sandbox Code Playgroud) 我在Java中实现了Levenshtein算法,现在我正在通过算法进行校正,即成本.这确实有点帮助,但不多,因为我希望结果为百分比.
所以我想知道如何计算这些相似点.
我也想知道你们这样做的原因以及原因.