Fast Levenshtein distance in R?

泪湿孤枕 提交于 2019-12-17 09:36:05

问题


Is there a package that contains Levenshtein distance counting function which is implemented as a C or Fortran code? I have many strings to compare and stringMatch from MiscPsycho is too slow for this.


回答1:


levenshteinDist (from the RecordLinkage package) calls compiled C code. Give it a try.




回答2:


And stringdist in the stringdist package does it too, even faster than levenshteinDist under certain conditions (1)




回答3:


You could try stringDist from Biostrings as well



来源:https://stackoverflow.com/questions/3182091/fast-levenshtein-distance-in-r

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!