Section navigation

Public method IntersectAutomaton

Namespace
Rowles.LeanCorpus.Codecs.Fst
Assembly
Rowles.LeanCorpus.dll

Methods

Public method IntersectAutomaton(IAutomaton)

Intersects the FST with an automaton, returning matching (key, output, finalState) triples. Both the automaton and the FST consume the same byte sequence; pruning is driven by CanMatch(int). The automaton is fed every byte of every key (callers wishing to skip a leading qualifier should construct a PrefixAutomaton over the qualifier and compose it with their target automaton, or use the qualifier overload).

Public method IntersectAutomaton(IAutomaton, ReadOnlySpan<byte>)

Intersects the FST with an automaton applied to the bytes following qualifier. Only keys starting with the qualifier are considered; the automaton sees the bare suffix.