[][src]Struct rustfst::algorithms::closure::ClosureFst

pub struct ClosureFst<W: Semiring, F: Fst<W> + 'static>(_, _);

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.

Implementations

impl<W, F> ClosureFst<W, F> where
    W: Semiring,
    F: MutableFst<W> + AllocableFst<W>, 
[src]

pub fn new(fst: F, closure_type: ClosureType) -> Result<Self>[src]

pub fn compute<F2: MutableFst<W> + AllocableFst<W>>(&self) -> Result<F2>[src]

Turns the Lazy FST into a static one.

Trait Implementations

impl<W, F> CoreFst<W> for ClosureFst<W, F> where
    W: Semiring,
    F: Fst<W>, 
[src]

type TRS = TrsVec<W>

Weight use in the wFST. This type must implement the Semiring trait.

impl<W: Debug + Semiring, F: Debug + Fst<W> + 'static> Debug for ClosureFst<W, F>[src]

impl<W, F> Fst<W> for ClosureFst<W, F> where
    W: Semiring,
    F: Fst<W> + 'static, 
[src]

impl<'a, W, F> FstIterator<'a, W> for ClosureFst<W, F> where
    W: Semiring,
    F: Fst<W> + 'a, 
[src]

type FstIter = <ReplaceFst<W, F, F> as FstIterator<'a, W>>::FstIter

impl<'a, W, F> StateIterator<'a> for ClosureFst<W, F> where
    W: Semiring,
    F: Fst<W> + 'a, 
[src]

type Iter = <ReplaceFst<W, F, F> as StateIterator<'a>>::Iter

Iterator used to iterate over the state_id of the states of an FST.

Auto Trait Implementations

impl<W, F> RefUnwindSafe for ClosureFst<W, F> where
    F: RefUnwindSafe,
    W: RefUnwindSafe

impl<W, F> Send for ClosureFst<W, F> where
    F: Send,
    W: Send

impl<W, F> Sync for ClosureFst<W, F> where
    F: Sync,
    W: Send

impl<W, F> Unpin for ClosureFst<W, F> where
    F: Unpin,
    W: Unpin

impl<W, F> UnwindSafe for ClosureFst<W, F> where
    F: UnwindSafe,
    W: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.