Commit fbb239f3 authored by Bruno Guillaume's avatar Bruno Guillaume
Browse files

remove transition mechanism GM1 -> GM2

parent 41ae6604
......@@ -355,12 +355,12 @@ module Corpus_desc = struct
List.map parse_one (json |> member "corpora" |> to_list)
(* ---------------------------------------------------------------------------------------------------- *)
let grew_match_table_and_desc ?config ~tmp_gm2 dir_opt name corpus =
let grew_match_table_and_desc ?config dir_opt name corpus =
match dir_opt with
| None -> ()
| Some dir ->
let stat = Conllx_stat.build ?config ("upos", None) ("ExtPos", Some "upos") corpus in
let html = Conllx_stat.to_html ~tmp_gm2 name ("upos", None) ("ExtPos", Some "upos") stat in
let html = Conllx_stat.to_html name ("upos", None) ("ExtPos", Some "upos") stat in
let out_file = Filename.concat dir (name ^ "_table.html") in
CCIO.with_out out_file (fun oc -> CCIO.write_line oc html);
......@@ -393,7 +393,7 @@ module Corpus_desc = struct
(* ---------------------------------------------------------------------------------------------------- *)
(* [grew_match] is a folder where tables, logs and corpus desc is stored *)
let build_marshal_file ?grew_match ~tmp_gm2 corpus_desc =
let build_marshal_file ?grew_match corpus_desc =
let config = corpus_desc.config in
let full_files = get_full_files corpus_desc in
let marshal_file = (Filename.concat corpus_desc.directory corpus_desc.id) ^ ".marshal" in
......@@ -415,7 +415,7 @@ module Corpus_desc = struct
let items = match corpus_desc.kind with
| Conll ->
let conll_corpus = Conllx_corpus.load_list ?log_file ~config:corpus_desc.config ?columns:corpus_desc.columns full_files in
grew_match_table_and_desc ~config:corpus_desc.config ~tmp_gm2 grew_match_dir corpus_desc.id conll_corpus;
grew_match_table_and_desc ~config:corpus_desc.config grew_match_dir corpus_desc.id conll_corpus;
CCArray.filter_map (fun (sent_id,conllx) ->
try
let init_graph = G_graph.of_json (Conllx.to_json conllx) in
......@@ -473,10 +473,10 @@ module Corpus_desc = struct
(* ---------------------------------------------------------------------------------------------------- *)
let compile ?(force=false) ?grew_match ?(tmp_gm2=false) corpus_desc =
let compile ?(force=false) ?grew_match corpus_desc =
let full_files = get_full_files corpus_desc in
let marshal_file = (Filename.concat corpus_desc.directory corpus_desc.id) ^ ".marshal" in
let really_marshal () = build_marshal_file ?grew_match ~tmp_gm2 corpus_desc in
let really_marshal () = build_marshal_file ?grew_match corpus_desc in
if force
then really_marshal ()
else
......
......@@ -55,7 +55,7 @@ module Corpus_desc : sig
val get_directory: t -> string
val load_json: string -> t list
val compile: ?force:bool -> ?grew_match: string -> ?tmp_gm2: bool -> t -> unit
val compile: ?force:bool -> ?grew_match: string -> t -> unit
val clean: t -> unit
end
Supports Markdown
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