Aho-Corasick Matcher

MacLeod, Matthew, Paul Mucur, Scott Matthewman · Zenodo (CERN European Organization for Nuclear Research) · 2016

A Ruby gem for finding strings in text using the Aho-Corasick string matching search. Aho-Corasick is O(n + m) where n is the size of the string to be searched and m is the size of the dictionary. This means it's particularly suited for searching for occurrences of words using large dictionaries, as the runtime increases only linearly. It's quite memory-intensive, and building a matcher is expensive – but once it's been built, matching terms is very fast. This release was used by the application described in "Where's the evidence? Identifying the academic research behind articles in the mainstream media" by MacLeod et al. (2016)

Read the paper · More papers on PaperTik