String 除了Knuth-Morris-Pratt、Rabin-Karp等,还有哪些可用的字符串匹配算法?

String 除了Knuth-Morris-Pratt、Rabin-Karp等,还有哪些可用的字符串匹配算法?,string,algorithm,pattern-matching,knuth-morris-pratt,rabin-karp,String,Algorithm,Pattern Matching,Knuth Morris Pratt,Rabin Karp,除了Knuth-Morris-Pratt、Rabin Karp等,还有哪些可用的字符串匹配算法?这些算法被广泛引用的概要可以在以下内容中找到: 包括以下算法: Karp-Rabin Shift Or Morris-Pratt Knuth-Morris-Pratt Simon Colussi Galil-Giancarlo Apostolico-Crochemore Not So Naive Forward Dawg Matching Boyer-Moore Turbo-BM

除了Knuth-Morris-Pratt、Rabin Karp等,还有哪些可用的字符串匹配算法?

这些算法被广泛引用的概要可以在以下内容中找到:

包括以下算法:

Karp-Rabin 
Shift Or 
Morris-Pratt 
Knuth-Morris-Pratt
Simon 
Colussi 
Galil-Giancarlo 
Apostolico-Crochemore
Not So Naive 
Forward Dawg Matching  
Boyer-Moore 
Turbo-BM 
Apostolico-Giancarlo 
Reverse Colussi 
Horspool 
Quick Search 
Tuned Boyer-Moore
Zhu-Takaoka 
Berry-Ravindran 
Smith 
Raita 
Reverse Factor 
Turbo Reverse Factor 
Backward Oracle Matching 
____________________________________________________________
Experimental results on englishTexts
Searching for a set of 200 patterns with length 128
Testing 5 algorithms

 - [1/5] BM ..................[OK]      0.88 ms       
 - [2/5] EPSM ................[OK]      0.38 ms       
 - [3/5] KMP .................[OK]      6.23 ms       
 - [4/5] KR ..................[OK]      1.84 ms       
 - [5/5] TW ..................[OK]      2.70 ms       
再加上大约15个人


顺便说一句,你可能想澄清一下,你是否也对字符串相似性算法感兴趣(例如,Levenshtein距离等),这些算法密切相关,如果您确实对此感兴趣。

本页对许多算法有很好的简要描述:

Simone Faro和Thierry Lecroq提供了一个C实现,并参考了86种精确的字符串匹配算法

它们还提供了一个框架来对字符串匹配算法进行基准测试:

Karp-Rabin 
Shift Or 
Morris-Pratt 
Knuth-Morris-Pratt
Simon 
Colussi 
Galil-Giancarlo 
Apostolico-Crochemore
Not So Naive 
Forward Dawg Matching  
Boyer-Moore 
Turbo-BM 
Apostolico-Giancarlo 
Reverse Colussi 
Horspool 
Quick Search 
Tuned Boyer-Moore
Zhu-Takaoka 
Berry-Ravindran 
Smith 
Raita 
Reverse Factor 
Turbo Reverse Factor 
Backward Oracle Matching 
____________________________________________________________
Experimental results on englishTexts
Searching for a set of 200 patterns with length 128
Testing 5 algorithms

 - [1/5] BM ..................[OK]      0.88 ms       
 - [2/5] EPSM ................[OK]      0.38 ms       
 - [3/5] KMP .................[OK]      6.23 ms       
 - [4/5] KR ..................[OK]      1.84 ms       
 - [5/5] TW ..................[OK]      2.70 ms       
算法

  • BM=Boyer Moore(1977年)
  • EPSM=精确压缩字符串匹配算法(2013年)
  • KMP=Knuth Morris Pratt(1977年)
  • KR=Karp Rabin(1987年)
  • TW=双向(1991年)

我的眼睛!我可怜的眼睛!用Adobe Acrobat无法查看该文件。谢谢。。。我只是很难过它不可读(不,我不是在开玩笑)如果你放大,它就没那么糟糕了。还有其他版本,包括PostScript和HTML(我认为这是无用的,但是YMMV):