pub trait ComposeFilter<W: Semiring, F1, F2, B1, B2, M1, M2>: Debug
where F1: Fst<W>, F2: Fst<W>, B1: Borrow<F1>, B2: Borrow<F2>, M1: Matcher<W, F1, B1>, M2: Matcher<W, F2, B2>,
{ type FS: FilterState; // Required methods fn start(&self) -> Self::FS; fn set_state( &mut self, s1: StateId, s2: StateId, filter_state: &Self::FS ) -> Result<()>; fn filter_tr( &mut self, arc1: &mut Tr<W>, arc2: &mut Tr<W> ) -> Result<Self::FS>; fn filter_final(&self, w1: &mut W, w2: &mut W) -> Result<()>; fn matcher1(&self) -> &M1; fn matcher2(&self) -> &M2; fn matcher1_shared(&self) -> &Arc<M1>; fn matcher2_shared(&self) -> &Arc<M2>; fn properties(&self, inprops: FstProperties) -> FstProperties; }
Expand description

Composition filters determine which matches are allowed to proceed. The filter’s state is represented by the type ComposeFilter::FS.

Required Associated Types§

Required Methods§

source

fn start(&self) -> Self::FS

source

fn set_state( &mut self, s1: StateId, s2: StateId, filter_state: &Self::FS ) -> Result<()>

source

fn filter_tr(&mut self, arc1: &mut Tr<W>, arc2: &mut Tr<W>) -> Result<Self::FS>

source

fn filter_final(&self, w1: &mut W, w2: &mut W) -> Result<()>

source

fn matcher1(&self) -> &M1

source

fn matcher2(&self) -> &M2

source

fn matcher1_shared(&self) -> &Arc<M1>

source

fn matcher2_shared(&self) -> &Arc<M2>

source

fn properties(&self, inprops: FstProperties) -> FstProperties

Implementors§

source§

impl<W, F1, F2, B1, B2, M1, M2> ComposeFilter<W, F1, F2, B1, B2, M1, M2> for NoMatchComposeFilter<W, F1, F2, B1, B2, M1, M2>
where W: Semiring, F1: Fst<W>, F2: Fst<W>, B1: Borrow<F1> + Debug, B2: Borrow<F2> + Debug, M1: Matcher<W, F1, B1>, M2: Matcher<W, F2, B2>,

source§

impl<W, F1, F2, B1, B2, M1, M2> ComposeFilter<W, F1, F2, B1, B2, M1, M2> for NullComposeFilter<W, F1, F2, B1, B2, M1, M2>
where W: Semiring, F1: Fst<W>, F2: Fst<W>, B1: Borrow<F1> + Debug, B2: Borrow<F2> + Debug, M1: Matcher<W, F1, B1>, M2: Matcher<W, F2, B2>,

source§

impl<W, F1, F2, B1, B2, M1, M2> ComposeFilter<W, F1, F2, B1, B2, M1, M2> for SequenceComposeFilter<W, F1, F2, B1, B2, M1, M2>
where W: Semiring, F1: Fst<W>, F2: Fst<W>, B1: Borrow<F1> + Debug, B2: Borrow<F2> + Debug, M1: Matcher<W, F1, B1>, M2: Matcher<W, F2, B2>,

source§

impl<W, F1, F2, B1, B2, M1, M2> ComposeFilter<W, F1, F2, B1, B2, M1, M2> for TrivialComposeFilter<W, F1, F2, B1, B2, M1, M2>
where W: Semiring, F1: Fst<W>, F2: Fst<W>, B1: Borrow<F1> + Debug, B2: Borrow<F2> + Debug, M1: Matcher<W, F1, B1>, M2: Matcher<W, F2, B2>,

source§

impl<W, F1, F2, B1, B2, M1, M2, CF> ComposeFilter<W, F1, F2, B1, B2, M1, M2> for MultiEpsFilter<W, F1, F2, B1, B2, M1, M2, CF>
where W: Semiring, F1: Fst<W>, F2: Fst<W>, B1: Borrow<F1> + Debug, B2: Borrow<F2> + Debug, M1: Matcher<W, F1, B1>, M2: Matcher<W, F2, B2>, CF: ComposeFilter<W, F1, F2, B1, B2, M1, M2>,

§

type FS = <CF as ComposeFilter<W, F1, F2, B1, B2, M1, M2>>::FS

source§

impl<W, F1, F2, B1, B2, M1, M2, CF, SMT> ComposeFilter<W, F1, F2, B1, B2, MultiEpsMatcher<W, F1, B1, M1>, MultiEpsMatcher<W, F2, B2, M2>> for PushLabelsComposeFilter<W, F1, F2, B1, B2, M1, M2, CF, SMT>
where W: Semiring, F1: Fst<W>, F2: Fst<W>, B1: Borrow<F1> + Debug + Clone, B2: Borrow<F2> + Debug + Clone, M1: LookaheadMatcher<W, F1, B1>, M2: LookaheadMatcher<W, F2, B2>, CF: LookAheadComposeFilterTrait<W, F1, F2, B1, B2, M1, M2>, SMT: MatchTypeTrait,

§

type FS = PairFilterState<<CF as ComposeFilter<W, F1, F2, B1, B2, M1, M2>>::FS, IntegerFilterState>

source§

impl<W, F1, F2, B1, B2, M1, M2, CF, SMT> ComposeFilter<W, F1, F2, B1, B2, M1, M2> for LookAheadComposeFilter<W, F1, F2, B1, B2, M1, M2, CF, SMT>
where W: Semiring, F1: Fst<W>, F2: Fst<W>, B1: Borrow<F1> + Debug, B2: Borrow<F2> + Debug, M1: LookaheadMatcher<W, F1, B1>, M2: LookaheadMatcher<W, F2, B2>, CF: LookAheadComposeFilterTrait<W, F1, F2, B1, B2, M1, M2>, SMT: MatchTypeTrait,

§

type FS = <CF as ComposeFilter<W, F1, F2, B1, B2, M1, M2>>::FS

source§

impl<W, F1, F2, B1, B2, M1, M2, CF, SMT> ComposeFilter<W, F1, F2, B1, B2, M1, M2> for PushWeightsComposeFilter<W, F1, F2, B1, B2, M1, M2, CF, SMT>
where W: SerializableSemiring + WeaklyDivisibleSemiring + WeightQuantize, F1: Fst<W>, F2: Fst<W>, B1: Borrow<F1> + Debug, B2: Borrow<F2> + Debug, M1: LookaheadMatcher<W, F1, B1>, M2: LookaheadMatcher<W, F2, B2>, CF: LookAheadComposeFilterTrait<W, F1, F2, B1, B2, M1, M2>, SMT: MatchTypeTrait,

§

type FS = PairFilterState<<CF as ComposeFilter<W, F1, F2, B1, B2, M1, M2>>::FS, WeightFilterState<W>>

source§

impl<W: Semiring, F1, F2, B1, B2, M1, M2> ComposeFilter<W, F1, F2, B1, B2, M1, M2> for AltSequenceComposeFilter<W, F1, F2, B1, B2, M1, M2>
where F1: Fst<W>, F2: Fst<W>, B1: Borrow<F1> + Debug, B2: Borrow<F2> + Debug, M1: Matcher<W, F1, B1>, M2: Matcher<W, F2, B2>,

source§

impl<W: Semiring, F1, F2, B1, B2, M1, M2> ComposeFilter<W, F1, F2, B1, B2, M1, M2> for MatchComposeFilter<W, F1, F2, B1, B2, M1, M2>
where F1: Fst<W>, F2: Fst<W>, B1: Borrow<F1> + Debug, B2: Borrow<F2> + Debug, M1: Matcher<W, F1, B1>, M2: Matcher<W, F2, B2>,