X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=tree.mli;h=8cffd189f5baed0f7f209dac8dbe85793b8f015b;hb=cf6d366b25132eea7b0f1966c11d034d748af0fa;hp=c38ab021e05e87fdac2b14cedee48aca0ca565ee;hpb=04639fe524ee20f7f84c8b08387312d714c9bd56;p=SXSI%2Fxpathcomp.git diff --git a/tree.mli b/tree.mli index c38ab02..8cffd18 100644 --- a/tree.mli +++ b/tree.mli @@ -1,13 +1,13 @@ type t -val init_contains : t -> string -> unit +val init_textfun : [ `CONTAINS | `STARTSWITH | `ENDSWITH | `EQUALS ] -> t -> string -> unit val init_naive_contains : t -> string -> unit val parse_xml_uri : string -> t val parse_xml_string : string -> t val save : t -> string -> unit -val load : ?sample:int -> string -> t +val load : ?sample:int -> ?load_text:bool -> string -> t val tag_pool : t -> Tag.pool @@ -56,6 +56,8 @@ val select_foll_ctx : t -> Ptset.Int.t -> [ `Tree ] node -> [`Tree] node -> [ ` val count : t -> string -> int val print_xml_fast : out_channel -> t -> [ `Tree ] node -> unit +val print_xml_fast2 : out_channel -> t -> [ `Tree ] node -> unit +val print_xml_fast3 : t -> [ `Tree ] node -> Unix.file_descr -> unit val tags_children : t -> Tag.t -> Ptset.Int.t val tags_below : t -> Tag.t -> Ptset.Int.t @@ -63,15 +65,24 @@ val tags_siblings : t -> Tag.t -> Ptset.Int.t val tags_after : t -> Tag.t -> Ptset.Int.t val tags : t -> Tag.t -> Ptset.Int.t*Ptset.Int.t*Ptset.Int.t*Ptset.Int.t val is_below_right : t -> [`Tree] node -> [`Tree] node -> bool +val is_binary_ancestor : t -> [`Tree] node -> [`Tree] node -> bool val is_left : t -> [`Tree] node -> bool val binary_parent : t -> [`Tree] node -> [`Tree] node val count_contains : t -> string -> int -val unsorted_contains : t -> string -> unit +(* val unsorted_contains : t -> string -> unit *) val text_size : t -> int val doc_ids : t -> [`Tree] node -> [`Text] node * [`Text] node val subtree_tags : t -> Tag.t -> [`Tree] node -> int val get_text : t -> [`Tree] node -> string +val get_text_id : t -> [`Tree] node -> [`Text ] node val dump_tree : Format.formatter -> t -> unit +val subtree_size : t -> [`Tree] node -> int +val subtree_elements : t -> [`Tree] node -> int +val text_below : t -> [`Tree] node -> [`Tree] node +val text_next : t -> [`Tree] node -> [`Tree] node -> [`Tree] node + +val closing : t -> [`Tree] node -> [`Tree] node +val is_open : t -> [`Tree] node -> bool