Jump to content

Aho–Corasick algorithm

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Boleslav Bobcik (talk | contribs) at 01:17, 18 February 2003 (Initial work, I will add more later). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

The string searching algorithm invented by Alfred V. Aho and Margaret J. Corasick searches the text for an element of finite set of patterns.

Informally, the algorithm constructs a search engine first and then uses it on raw text. In many cases, where the set of patterns is given in advance (e.g. computer virus database), the construction step could be performed only once and the compiled engine stored for later use.