gpt4 book ai didi

java - Java 的近似正则表达式库?

转载 作者:行者123 更新时间:2023-11-30 05:11:18 25 4
gpt4 key购买 nike

我刚刚编写了一些用于近似字符串匹配的代码。我想将我的简单算法与 JVM 上运行的更成熟的实现进行基准测试。有什么建议吗?

最佳答案

我在本网站的其他地方找到了类似问题的答案。

Commons Lang has an implementation of Levenshtein distance.
http://commons.apache.org/lang/api-release/org/apache/commons/lang/StringUtils.html

Commons Codec has an implementation of soundex and metaphone.
http://commons.apache.org/codec/api-release/org/apache/commons/codec/language/Soundex.html
http://commons.apache.org/codec/api-release/org/apache/commons/codec/language/Metaphone.html

( source )

Lucene (http://lucene.apache.org/) also implements Levenshtein edit distance.

(source:非常棒)

关于java - Java 的近似正则表达式库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3273115/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com