Download the PHP package wikimedia/aho-corasick without Composer
On this page you can find all versions of the php package wikimedia/aho-corasick. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wikimedia/aho-corasick
More information about wikimedia/aho-corasick
Files in wikimedia/aho-corasick
Package aho-corasick
Short Description An implementation of the Aho-Corasick string matching algorithm.
License Apache-2.0
Homepage https://gerrit.wikimedia.org/g/AhoCorasick
Informations about the package aho-corasick
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.
The algorithm originates from "Efficient string matching: an aid to bibliographic search" (CACM, Volume 18, Issue 6, June 1975) by Alfred V. Aho and Margaret J. Corasick.
See also the definition and reference implementation on nist.gov.
Contribute
- Issue tracker: https://phabricator.wikimedia.org/tag/ahocorasick/
- Source code: https://gerrit.wikimedia.org/g/AhoCorasick
Support
If you are having issues, please let us know.
License
The project is licensed under the Apache license.