1 let index_empty_texts = ref false
2 let sample_factor = ref 64
3 let disable_text_collection = ref false
6 let input_file = ref ""
7 let output_file = ref None
10 let usage_msg = Printf.sprintf "%s <input.xml> 'query' [output]" Sys.argv.(0)
15 fun s -> match !pos with
16 | 0 -> input_file:= s;incr pos
17 | 1 -> query := s; incr pos
18 | 2 -> output_file := Some s; incr pos
19 | _ -> raise (Arg.Bad(s))
21 let spec = [ "-f", Arg.Set_int(sample_factor),"sample factor [default=64]";
22 "-i", Arg.Set(index_empty_texts),"index empty texts [default=false]";
23 "-d", Arg.Set(disable_text_collection),"Disable text collection[default=false]";
24 "-s", Arg.Set_string(save_file),"Save the intermediate representation into file.srx";
28 let _ = Arg.parse spec anon_fun usage_msg
30 if (!pos > 3 || !pos < 2)
31 then begin Arg.usage spec usage_msg; exit 1 end