A Boyer-Moore automaton is based on lookup-tables that allow skipping through the haystack. This allows for sub-linear matching in some cases, as we do not have to look at every input character.
NOTE: Unlike the AcMachine, a Boyer-Moore automaton only returns non-overlapping matches. This means that a Boyer-Moore automaton is not a 100% drop-in replacement for Aho-Corasick.
Returning overlapping matches would degrade the performance to O(nm) in pathological cases like
finding aaaa in aaaaa....aaaaaa as for each match it would scan back the whole m characters
of the pattern.
Instances8Eq, Show, Generic, NFData, Hashable, FromJSON, …
Eq AutomatonDefined in alfred-margaret-2.1.1.1 · Data.Text.BoyerMoore.AutomatonShow AutomatonDefined in alfred-margaret-2.1.1.1 · Data.Text.BoyerMoore.AutomatonGeneric AutomatonDefined in alfred-margaret-2.1.1.1 · Data.Text.BoyerMoore.AutomatonNFData AutomatonDefined in alfred-margaret-2.1.1.1 · Data.Text.BoyerMoore.AutomatonHashable AutomatonDefined in alfred-margaret-2.1.1.1 · Data.Text.BoyerMoore.AutomatonFromJSON AutomatonDefined in alfred-margaret-2.1.1.1 · Data.Text.BoyerMoore.AutomatonToJSON AutomatonDefined in alfred-margaret-2.1.1.1 · Data.Text.BoyerMoore.Automatontype Rep Automaton = D1 ('MetaDataDefined in alfred-margaret-2.1.1.1 · Data.Text.BoyerMoore.Automaton"Automaton"
"Data.Text.BoyerMoore.Automaton"
"alfred-margaret-2.1.1.1-ASFUiU1mFjDAljTyYzURM4"
'False) (C1 ('MetaCons"Automaton"
'PrefixI 'True) ((S1 ('MetaSel ('Just"automatonPattern"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just"automatonPatternHash"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int)) :*: (S1 ('MetaSel ('Just"automatonSuffixTable"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 SuffixTable) :*: S1 ('MetaSel ('Just"automatonBadCharTable"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BadCharTable))))