Trait rustfst::fst_traits::SerializableFst[][src]

pub trait SerializableFst<W: SerializableSemiring>: ExpandedFst<W> {
    fn fst_type() -> String;
fn read<P: AsRef<Path>>(path_bin_fst: P) -> Result<Self>;
fn write<P: AsRef<Path>>(&self, path_bin_fst: P) -> Result<()>;
fn from_parsed_fst_text(parsed_fst_text: ParsedTextFst<W>) -> Result<Self>; fn from_text_string(fst_string: &str) -> Result<Self> { ... }
fn read_text<P: AsRef<Path>>(path_text_fst: P) -> Result<Self> { ... }
fn write_text<P: AsRef<Path>>(&self, path_output: P) -> Result<()> { ... }
fn text(&self) -> Result<String> { ... }
fn draw<P: AsRef<Path>>(
        &self,
        path_output: P,
        config: &DrawingConfig
    ) -> Result<()> { ... } }
Expand description

Trait definining the methods an Fst must implement to be serialized and deserialized.

Required methods

String identifying the type of the FST. Will be used when serialiing and deserializing an FST in binary format.

Loads an FST from a file in binary format.

Writes the FST to a file in binary format.

Turns a generic wFST format into the one of the wFST.

Provided methods

Deserializes a wFST in text from a path and returns a loaded wFST.

Deserializes a wFST in text from a path and returns a loaded wFST.

Serializes the FST as a text file in a format compatible with OpenFST.

Writes the text representation of the FST into a String.

Serializes the FST as a DOT file compatible with GraphViz binaries.

Implementors