Trait rustfst::algorithms::compose::compose_filters::ComposeFilter
source · pub trait ComposeFilter<W: Semiring, F1, F2, B1, B2, M1, M2>: Debugwhere
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.