sig
type variable = int
type varvalue = int
type condition = bool * Mn.Factor.variable * Mn.Factor.varvalue
type feature =
Factor.feature = {
cond : Mn.Factor.condition array;
weight_id : int;
mutable weight : float;
}
type tree =
Factor.tree =
Leaf of float
| Vertex of Mn.Factor.variable * Mn.Factor.varvalue * Mn.Factor.tree *
Mn.Factor.tree
type factor =
Factor.factor =
Feature of Mn.Factor.feature
| FeatureSet of Mn.Factor.feature list
| Table of Mn.Factor.variable array * int array * float array
| Tree of Mn.Factor.tree
| Const of float
val simple_cond_cmp : Mn.Factor.condition -> Mn.Factor.condition -> int
val remove_redundant_conds :
Mn.Factor.condition list -> Mn.Factor.condition list
val condl_to_valsetl :
int array -> Mn.Factor.condition list -> (int * bool array) list
val fmatch : Mn.Factor.varvalue array -> Mn.Factor.condition array -> bool
val fweight : Mn.Factor.varvalue array -> Mn.Factor.feature -> float
val log_value : Mn.Factor.varvalue array -> Mn.Factor.factor -> float
val expected_log_value :
Mn.Factor.factor -> float array array -> float array array -> float
val numparams : Mn.Factor.factor -> int
val simplify_feature :
Mn.Factor.varvalue array -> Mn.Factor.feature -> Mn.Factor.feature
val simplify :
Mn.Factor.varvalue array -> Mn.Factor.factor -> Mn.Factor.factor
val tree_to_features :
Mn.Factor.condition list -> Mn.Factor.tree -> Mn.Factor.feature list
val table_to_features :
Mn.Factor.variable array * int array * float array ->
Mn.Factor.feature list
val to_features : Mn.Factor.factor -> Mn.Factor.feature list
val set_weights :
float array -> int -> Mn.Factor.factor -> Mn.Factor.factor * int
val vars : Mn.Factor.factor -> Mn.Factor.variable list
val feature_set_vars : Mn.Factor.feature list -> Mn.Factor.variable list
val tree_vars : Mn.Factor.tree -> Mn.Factor.variable list
val to_table : int array -> Mn.Factor.factor -> Mn.Factor.factor
val copy : Mn.Factor.factor -> Mn.Factor.factor
val rescale : float -> Mn.Factor.factor -> Mn.Factor.factor
val output_factor : Pervasives.out_channel -> Mn.Factor.factor -> unit
val output_feature : Pervasives.out_channel -> Mn.Factor.feature -> unit
val output_featurelist :
Pervasives.out_channel -> Mn.Factor.feature list -> unit
val output_tree :
Pervasives.out_channel -> string -> Mn.Factor.tree -> unit
module MP :
sig
type pcond = Mn.Factor.condition
type pfeature = int * float * Mn.Factor.MP.pcond list
type pfeaturelist = Mn.Factor.MP.pfeature list
type ptree =
MnParseTypes.ptree =
PLeaf of float
| PVertex of int * int * Mn.Factor.MP.ptree * Mn.Factor.MP.ptree
type pfactor =
MnParseTypes.pfactor =
PFeatureSet of Mn.Factor.MP.pfeaturelist
| PFeatureTable of Mn.Factor.MP.pfeaturelist
| PFeatureTree of Mn.Factor.MP.ptree
| PFeature of Mn.Factor.MP.pfeature
type pmn =
MnParseTypes.pmn = {
factors : Mn.Factor.MP.pfactor list;
weights : (int * float) list;
}
end
val pfactor_to_factor :
int array -> Mn.Factor.MP.pfactor -> Mn.Factor.factor
end