projects
/
SXSI
/
xpathcomp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Commit before branching to new XPath compilation
[SXSI/xpathcomp.git]
/
main.ml
diff --git
a/main.ml
b/main.ml
index
4e12ae8
..
021a18e
100644
(file)
--- a/
main.ml
+++ b/
main.ml
@@
-60,7
+60,7
@@
let main v query_string output =
Printf.eprintf "Finding min occurences : ";
time
( List.fold_left (fun ((min_occ,kind)as acc) (tag,_) ->
Printf.eprintf "Finding min occurences : ";
time
( List.fold_left (fun ((min_occ,kind)as acc) (tag,_) ->
- let numtags = Tree.subtree_tags v tag in
+ let numtags = Tree.subtree_tags v tag
Tree.root
in
if ((numtags < min_occ) && numtags >= 2)
then (numtags,`TAG(tag))
else acc) jump_to) ltags
if ((numtags < min_occ) && numtags >= 2)
then (numtags,`TAG(tag))
else acc) jump_to) ltags
@@
-79,6
+79,7
@@
let main v query_string output =
(if !Options.count_only then "(counting only)" else if !Options.backward then "(bottomup)" else "");
begin
let _ = Gc.full_major();Gc.compact() in
(if !Options.count_only then "(counting only)" else if !Options.backward then "(bottomup)" else "");
begin
let _ = Gc.full_major();Gc.compact() in
+ let _ = Printf.eprintf "%!" in
(* let _ = Gc.set (disabled_gc) in *)
if !Options.backward && ((snd test_list) != `NOTHING )then
(* let _ = Gc.set (disabled_gc) in *)
if !Options.backward && ((snd test_list) != `NOTHING )then
@@
-107,9
+108,9
@@
let main v query_string output =
let oc = open_out f in
output_string oc "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
IdSet.iter (fun t ->
let oc = open_out f in
output_string oc "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
IdSet.iter (fun t ->
- Tree.print_xml_fast oc t;
+ Tree.print_xml_fast oc
v
t;
output_char oc '\n';
output_char oc '\n';
- output_string oc "----------\n";
+
) result) ();
end;
end;
) result) ();
end;
end;
@@
-125,7
+126,7
@@
let v =
begin
Printf.eprintf "Loading from file : ";
time (Tree.load ~sample:!Options.sample_factor )
begin
Printf.eprintf "Loading from file : ";
time (Tree.load ~sample:!Options.sample_factor )
-
(Filename.chop_suffix !Options.input_file ".srx")
;
+
!Options.input_file
;
end
else
let v =
end
else
let v =