Module rustfst::algorithms::closure
source · Expand description
Functions to compute Kleene closure (star or plus) of an FST.
Structs§
- Computes the concatenative closure. This version is a delayed FST. If an FST transduces string x to y with weight a, then its closure transduces x to y with weight a, xx to yy with weight Times(a, a), xxx to yyy with weight Times(Times(a, a), a), etc. If closure_type == CLOSURE_STAR, then the empty string is transduced to itself with weight Weight::One() as well.
Enums§
- Defines the different types of closure : Star or Plus.
Functions§
- This operation computes the concatenative closure. If A transduces string
x
toy
with weighta
, then the closure transducesx
toy
with weighta
,xx
toyy
with weighta ⊗ a
,xxx
toyyy
with weighta ⊗ a ⊗ a
, etc. If closure_star then the empty string is transduced to itself with weight1
as well.