Commit 6ad473dd authored by Bruno Guillaume's avatar Bruno Guillaume
Browse files

Avoid exception

parent b8a6747e
......@@ -230,9 +230,9 @@ let count () =
(fun () ->
match !Grew_args.patterns with
| [] -> Log.fwarning "No pattern given (use option -patterns)"
| l ->
| _ ->
printf "Corpus\t# sentences";
List.iter (fun p -> printf "\t%s" (p |> Filename.basename |> Filename.chop_extension)) l;
List.iter (fun p -> printf "\t%s" (p |> Filename.basename |> Filename.remove_extension)) !Grew_args.patterns;
printf "\n";
List.iter (
......@@ -241,7 +241,8 @@ let count () =
List.iter
(fun corpus_desc ->
let config = Corpus_desc.get_config corpus_desc in
let patterns = List.map (Pattern.load ~config) l in
(* NB: pattern loading depends on the config -> reload for each corpus! *)
let patterns = List.map (Pattern.load ~config) !Grew_args.patterns in
let id = Corpus_desc.get_id corpus_desc in
let directory = Corpus_desc.get_directory corpus_desc in
let marshal_file = (Filename.concat directory id) ^ ".marshal" in
......
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