close
The Wayback Machine - https://web.archive.org/web/20211106105508/https://gerrit.wikimedia.org/g/AhoCorasick
Clone this repo:

Branches

  1. 2035cd0 build: Updating composer dependencies by libraryupgrader · 14 days ago master
  2. 3bf3b00 build: Updating mediawiki/mediawiki-codesniffer to 37.0.0 by libraryupgrader · 4 months ago
  3. 5370a69 build: Cleanup and improve .phpcs.xml by Umherirrender · 6 months ago
  4. 86d4750 build: Updating composer dependencies by libraryupgrader · 6 months ago
  5. 4cf1913 build: Updating composer dependencies by libraryupgrader · 9 months ago

Packagist.org

AhoCorasick

AhoCorasick is a PHP implementation of the Aho-Corasick string search algorithm, which is an efficient way of searching a body of text for multiple search keywords.

Here is how you use it:

Features

The algorithm works by constructing a finite-state machine out of the set of search keywords. The time it takes to construct the finite state machine is proportional to the sum of the lengths of the search keywords. Once constructed, the machine can locate all occurences of all search keywords in any body of text in a single pass, making exactly one state transition per input character.

Contribute

Support

If you are having issues, please let us know.

License

The project is licensed under the Apache license.