- Suffix trees with incremental addition and removal of strings.
+ Suffix trees with incremental addition and removal of strings
plus incremental maintenance of maximal factors.
+ Author: S-Aébastien Ferré <firstname.lastname@example.org>.-b
+(* copied from module Common *)
+let rec fold_while : ('a -> 'a option) -> 'a -> 'a =
+ | Some e' -> fold_while f e'
+let rec mapfind : ('a -> 'b option) -> 'a list -> 'b =
+ |  -> raise Not_found
+ | x::l -> match f x with
-(* val is_visible : string -> bool *)
val get_visible : string -> int * int
+ (** [get_visible s] returns the sizes of the prefix and suffix of [s]
+ that can be removed from [s] without damage to its meaning. *)
let rec max_restrictions st node =
let res1 = max_restrictions_aux st (LSet.empty ()) (path_restrictions st node) in
let factor = find_factor st str in
match has_end st factor with
let (strid,pos) = suffix st leaf in
if pos = 0 then Some strid else None) (* there should be only one *)
ignore (add st "formal concept analysis");
ignore (add st "logical concept analysis");
- ignore (add st "conceptual graphs");;
+ ignore (add st "conceptual graphs");