Skip to main content

Module fst

Module fst 

Source
Expand description

Finite-State Transducer for morphology.

A simple trie of surface forms → lemma|features, walked for lookups. When an exact surface is absent, suffix-based morphology rules strip common English inflections (-s, -ed, -ing, -es) and re-lookup the stem, annotating the result with the corresponding feature tag.

Deterministic, allocation-free in the hot lookup walk (results own their Strings, which is Tier-2 authoring output). WASM-compatible.

Structs§

FstDict
Compiled FST dictionary: a trie mapping surface bytes to an entry id.
FstResult
One morphology analysis result for a surface form.