Skip to content

Python implementation of Aho-Corasick algorithm for string searching

Notifications You must be signed in to change notification settings

Superchen17/Aho-Corasick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Implementation of Aho-Corasick Algorithm

Reference: https://cr.yp.to/bib/1975/aho.pdf

Demo

the result of executing the sample in main.py is as follows:

input:

text = 'ahishers'
words = {'he', 'she', 'his', 'hers'}

output:

his from position 1 to 3
he from position 4 to 5
she from position 3 to 5
hers from position 4 to 7

About

Python implementation of Aho-Corasick algorithm for string searching

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages