Skip to content

Instantly share code, notes, and snippets.

%%% File : ahocorasik.erl
%%% Author : Fyodor Ustinov <ufm@ufm.su>
%%% Descrip.: Multiple search based on Aho-Corasick string matching algorithm
%%%
%%% License : GPL
%%%
%%% Usage:
%%% ahocorasik:match(["pat1", "pat2"], "pat1 pat2 pat1")
%%% or
%%% Tree = ahocorasik:tree(["pat1", "pat2"])