Commit 3784ca74 authored by Bruno Guillaume's avatar Bruno Guillaume

Change type of ?filter arg of function Graph.to_dep

parent fc128a26
......@@ -339,7 +339,7 @@ module G_fs = struct
then (sprintf "%s:B:yellow" esc_atom) :: acc
else
match filter with
| Some filt_list when not (List.mem feat_name filt_list) -> acc
| Some test when not (test feat_name) -> acc
| _ -> esc_atom :: acc
) last sub in
let subword = String.concat "#" (List.rev lines) in
......@@ -409,7 +409,7 @@ module P_fs = struct
let to_dep ?filter param_names t =
let reduced = match filter with
| None -> t
| Some l -> List.filter (fun (fn,_) -> List.mem fn l) t in
| Some test -> List.filter (fun (fn,_) -> test fn) t in
List_.to_string (P_feature.to_string ~param_names) "#" reduced
let to_dot t = List_.to_string P_feature.to_string "\\n" t
......
......@@ -48,7 +48,7 @@ module G_fs: sig
val to_gr: t -> string
val to_dot: ?decorated_feat:(string * string list) -> ?main_feat: string -> t -> string
val to_word: ?main_feat: string -> t -> string
val to_dep: ?decorated_feat:(string * string list) -> ?position:float -> ?main_feat: string -> ?filter: string list -> t -> string
val to_dep: ?decorated_feat:(string * string list) -> ?position:float -> ?main_feat: string -> ?filter: (string -> bool) -> t -> string
val to_conll_string: ?exclude: string list -> t -> string
val to_conll: ?exclude: string list -> t -> (string * string) list
......@@ -79,7 +79,7 @@ module P_fs: sig
val to_string: t -> string
val to_dep: ?filter: string list -> (string list * string list) -> t -> string
val to_dep: ?filter: (string -> bool) -> (string list * string list) -> t -> string
val to_dot: t -> string
......
......@@ -198,7 +198,7 @@ module G_graph: sig
val to_gr: ?domain:Domain.t -> t -> string
val to_dot: ?domain:Domain.t -> ?main_feat:string -> ?deco:G_deco.t -> t -> string
val to_sentence: ?main_feat:string -> t -> string
val to_dep: ?domain:Domain.t -> ?filter : string list -> ?main_feat:string -> ?deco:G_deco.t -> t -> string
val to_dep: ?domain:Domain.t -> ?filter: (string -> bool) -> ?main_feat:string -> ?deco:G_deco.t -> t -> string
val to_conll: ?domain:Domain.t -> t -> Conll.t
val to_conll_string: ?domain:Domain.t -> t -> string
end (* module G_graph *)
......
......@@ -46,7 +46,7 @@ module Instance : sig
val to_conll_string: ?domain:Domain.t -> t -> string
(** [save_dot_png base t] writes a file "base.png" with the dot representation of [t] *)
val save_dot_png: ?domain:Domain.t -> ?filter: string list -> ?main_feat: string -> string -> t -> unit
val save_dot_png: ?domain:Domain.t -> ?filter: (string -> bool) -> ?main_feat: string -> string -> t -> unit
end (* module Instance *)
(* ================================================================================ *)
......
......@@ -91,7 +91,7 @@ module Graph : sig
val to_dot : ?domain:Domain.t -> ?main_feat:string -> ?deco:Deco.t -> t -> string
val to_dep : ?domain:Domain.t -> ?filter: string list -> ?main_feat:string -> ?deco:Deco.t -> t -> string
val to_dep : ?domain:Domain.t -> ?filter: (string -> bool) -> ?main_feat:string -> ?deco:Deco.t -> t -> string
val to_gr: ?domain:Domain.t -> t -> string
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment