1 let index_empty_texts = ref false
2 let sample_factor = ref 64
3 let disable_text_collection = ref false
4 let tc_threshold = ref 60000
7 let input_file = ref ""
8 let output_file = ref None
10 let count_only = ref false
12 let backward = ref false
14 let usage_msg = Printf.sprintf "%s <input.{xml|srx}> 'query' [output]" Sys.argv.(0)
19 fun s -> match !pos with
20 | 0 -> input_file:= s;incr pos
21 | 1 -> query := s; incr pos
22 | 2 -> output_file := Some s; incr pos
23 | _ -> raise (Arg.Bad(s))
25 let spec = [ "-c", Arg.Set(count_only), "counting only (don't materialize the result set)";
26 "-t", Arg.Set(time), "print timing statistics";
27 "-max-tc", Arg.Set_int(tc_threshold), "set maximum count for which the TextCollection is used";
28 "-f", Arg.Set_int(sample_factor), "sample factor [default=64]";
29 "-i", Arg.Set(index_empty_texts), "index empty texts [default=false]";
30 "-d", Arg.Set(disable_text_collection), "disable text collection[default=false]";
31 "-s", Arg.Set_string(save_file), "save the intermediate representation into file.srx";
32 "-b", Arg.Set(backward), "real bottom up run";
36 let _ = Arg.parse spec anon_fun usage_msg
38 if (!pos > 3 || !pos < 2)
39 then begin Arg.usage spec usage_msg; exit 1 end