open Utils
open Format
-let index_empty_texts = ref false
+let index_empty_texts = ref true
let sample_factor = ref 64
let disable_text_collection = ref false
let tc_threshold = ref 60000
"-f", Arg.Set_int(sample_factor),
"<n> sample factor [default=64]";
- "-i", Arg.Set(index_empty_texts),
- " index empty texts [default=false]";
+ "-ne", Arg.Clear(index_empty_texts),
+ " don't index empty texts [default=index]";
"-d", Arg.Set(disable_text_collection),
" disable text collection[default=false]";
let do_text b t =
if Buffer.length t > 0 then begin
let s = Buffer.contents t in
- begin
- open_tag b "<$>";
- text b s;
- close_tag b "<$>";
- end;
+ if (!Options.index_empty_texts) || not (is_whitespace s) then
+ begin
+ open_tag b "<$>";
+ Printf.eprintf "Inserting >>%s<<\n" s;
+ text b s;
+ close_tag b "<$>";
+ end;
Buffer.clear t
end