Function rustfst::algorithms::shortest_path_with_config

source ·
pub fn shortest_path_with_config<W, FI, FO>(
    ifst: &FI,
    config: ShortestPathConfig
) -> Result<FO>
Expand description

Create an FST containing the n-shortest paths in the input FST. The n-shortest paths are the n-lowest weight paths w.r.t. the natural semiring order.

§Example

§Input

shortestpath_in

§Output with n=1

shortestpath_out_n_1

§Output with n=2

shortestpath_out_n_2