Further optimisations, changed the prototype of Tree.mli
[SXSI/xpathcomp.git] / main.ml
diff --git a/main.ml b/main.ml
index 4e12ae8..4fcc0af 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,_) ->
-                             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
@@ -107,7 +107,7 @@ 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 -> 
-                                                   Tree.print_xml_fast oc t;
+                                                   Tree.print_xml_fast oc t;
                                                    output_char oc '\n';
                                                    output_string oc "----------\n";
                                                 ) result) ();