Automata.WFAWeighted finite automaton (WFA) parameterised over a semiring.
A WFA is a triple (ι, δ, λ): ι is the initial weight row-vector, δ maps each character to a transition matrix, and λ is the output column-vector. Semantics: outs aut w = ι · M(a₁) · … · M(aₙ) · λ.
type stats_dim = {states : Base.int;init : Base.int;Number of non-zero initial weights.
*)fin : Base.int;Number of non-zero output weights.
*)trans : Base.int;Total number of non-zero transition weights.
*)}Structural statistics about a WFA, written to the output JSON.
val pp_stats_dim :
Ppx_deriving_runtime.Format.formatter ->
stats_dim ->
Ppx_deriving_runtime.unitval show_stats_dim : stats_dim -> Ppx_deriving_runtime.stringval stats_dim_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> stats_dimval yojson_of_stats_dim : stats_dim -> Ppx_yojson_conv_lib.Yojson.Safe.ttype stats_sym = {non_det : Base.int Base.list;Per-character count of states with ≠ 1 non-zero outgoing weight.
*)avg_con : Base.float Base.list;Per-character average number of non-zero outgoing weights per state.
*)}Symbolic structure statistics (non-determinism and average connectivity).
val pp_stats_sym :
Ppx_deriving_runtime.Format.formatter ->
stats_sym ->
Ppx_deriving_runtime.unitval show_stats_sym : stats_sym -> Ppx_deriving_runtime.stringval stats_sym_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> stats_symval yojson_of_stats_sym : stats_sym -> Ppx_yojson_conv_lib.Yojson.Safe.tval pp_stats :
Ppx_deriving_runtime.Format.formatter ->
stats ->
Ppx_deriving_runtime.unitval show_stats : stats -> Ppx_deriving_runtime.stringval stats_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> statsval yojson_of_stats : stats -> Ppx_yojson_conv_lib.Yojson.Safe.tmodule type S = sig ... endMinimal interface required of the state type (integer in practice).
module type T = sig ... endModule type for a concrete weighted finite automaton parametric in a semiring element type s.