1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
pub(crate) mod fst_001_empty; pub(crate) mod fst_002_linear_acceptor_0_label; pub(crate) mod fst_003_linear_acceptor_1_label; pub(crate) mod fst_004_linear_acceptor_3_labels; pub(crate) mod fst_006_linear_transducer_1_label; pub(crate) mod fst_007_linear_transducer_3_to_2_labels; pub(crate) mod fst_008; pub(crate) mod fst_009; pub(crate) mod fst_010; #[cfg(test)] use crate::fst_impls::VectorFst; #[cfg(test)] use crate::semirings::IntegerWeight; #[cfg(test)] use crate::test_data::TestFstData; #[cfg(test)] use std::vec::IntoIter; #[cfg(test)] pub(crate) fn get_linear_fsts() -> Vec<TestFstData<VectorFst<IntegerWeight>>> { let mut vec = vec![]; vec.push(fst_001_empty::EmptyFst::new().into()); vec.push(fst_002_linear_acceptor_0_label::LinearAcceptor0Label::new().into()); vec.push(fst_003_linear_acceptor_1_label::LinearAcceptor1Label::new().into()); vec.push(fst_004_linear_acceptor_3_labels::LinearAcceptor3Labels::new().into()); vec.push(fst_006_linear_transducer_1_label::LinearTransducerOneLabel::new().into()); vec.push(fst_007_linear_transducer_3_to_2_labels::LinearTransducer3to2Labels::new().into()); vec } #[cfg(test)] pub(crate) fn get_vector_fsts_for_tests() -> IntoIter<TestFstData<VectorFst<IntegerWeight>>> { let mut res = get_linear_fsts(); res.push(fst_008::VectorFst008::new().into()); res.push(fst_009::VectorFst009::new().into()); res.push(fst_010::VectorFst010::new().into()); res.into_iter() } // TODO : Add not connected FST