Efficient way of testing for substring being one of a set?

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Thu Apr 3 15:18:04 CEST 2008


Dennis Benzinger:
> You could use the Aho-Corasick algorithm <http://en.wikipedia.org/wiki/
> Aho-Corasick_algorithm>.
> I don't know if there's a Python implementation yet.

http://hkn.eecs.berkeley.edu/~dyoo/python/ahocorasick/

Bye,
bearophile



More information about the Python-list mailing list