Trait rustfst::algorithms::WeightConverter
source · pub trait WeightConverter<SI: Semiring, SO: Semiring> {
// Required methods
fn tr_map(&mut self, tr: &Tr<SI>) -> Result<Tr<SO>>;
fn final_tr_map(&mut self, final_tr: &FinalTr<SI>) -> Result<FinalTr<SO>>;
fn final_action(&self) -> MapFinalAction;
fn properties(&self, iprops: FstProperties) -> FstProperties;
}
Expand description
The WeightConverter interfaces defines how a weight should be turned into another one. Useful for changing the semiring of an FST.