sig
type 'a sequence = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
module type STRING =
sig
type char_
type t
val of_list : CCLevenshtein.STRING.char_ list -> CCLevenshtein.STRING.t
val get : CCLevenshtein.STRING.t -> int -> CCLevenshtein.STRING.char_
val length : CCLevenshtein.STRING.t -> int
val compare_char :
CCLevenshtein.STRING.char_ -> CCLevenshtein.STRING.char_ -> int
end
type 'a klist = unit -> [ `Cons of 'a * 'a CCLevenshtein.klist | `Nil ]
val klist_to_list : 'a CCLevenshtein.klist -> 'a list
module type S =
sig
type char_
type string_
val edit_distance :
CCLevenshtein.S.string_ -> CCLevenshtein.S.string_ -> int
type automaton
val of_string :
limit:int -> CCLevenshtein.S.string_ -> CCLevenshtein.S.automaton
val of_list :
limit:int -> CCLevenshtein.S.char_ list -> CCLevenshtein.S.automaton
val debug_print :
(Pervasives.out_channel -> CCLevenshtein.S.char_ -> unit) ->
Pervasives.out_channel -> CCLevenshtein.S.automaton -> unit
val match_with :
CCLevenshtein.S.automaton -> CCLevenshtein.S.string_ -> bool
module Index :
sig
type 'b t
val empty : 'b CCLevenshtein.S.Index.t
val is_empty : 'a CCLevenshtein.S.Index.t -> bool
val add :
'b CCLevenshtein.S.Index.t ->
CCLevenshtein.S.string_ -> 'b -> 'b CCLevenshtein.S.Index.t
val cardinal : 'a CCLevenshtein.S.Index.t -> int
val remove :
'b CCLevenshtein.S.Index.t ->
CCLevenshtein.S.string_ -> 'b CCLevenshtein.S.Index.t
val retrieve :
limit:int ->
'b CCLevenshtein.S.Index.t ->
CCLevenshtein.S.string_ -> 'b CCLevenshtein.klist
val of_list :
(CCLevenshtein.S.string_ * 'b) list -> 'b CCLevenshtein.S.Index.t
val to_list :
'b CCLevenshtein.S.Index.t -> (CCLevenshtein.S.string_ * 'b) list
val add_seq :
'a CCLevenshtein.S.Index.t ->
(CCLevenshtein.S.string_ * 'a) CCLevenshtein.sequence ->
'a CCLevenshtein.S.Index.t
val of_seq :
(CCLevenshtein.S.string_ * 'a) CCLevenshtein.sequence ->
'a CCLevenshtein.S.Index.t
val to_seq :
'a CCLevenshtein.S.Index.t ->
(CCLevenshtein.S.string_ * 'a) CCLevenshtein.sequence
val add_gen :
'a CCLevenshtein.S.Index.t ->
(CCLevenshtein.S.string_ * 'a) CCLevenshtein.gen ->
'a CCLevenshtein.S.Index.t
val of_gen :
(CCLevenshtein.S.string_ * 'a) CCLevenshtein.gen ->
'a CCLevenshtein.S.Index.t
val to_gen :
'a CCLevenshtein.S.Index.t ->
(CCLevenshtein.S.string_ * 'a) CCLevenshtein.gen
val fold :
('a -> CCLevenshtein.S.string_ -> 'b -> 'a) ->
'a -> 'b CCLevenshtein.S.Index.t -> 'a
val iter :
(CCLevenshtein.S.string_ -> 'b -> unit) ->
'b CCLevenshtein.S.Index.t -> unit
val to_klist :
'b CCLevenshtein.S.Index.t ->
(CCLevenshtein.S.string_ * 'b) CCLevenshtein.klist
end
end
module Make :
functor (Str : STRING) ->
sig
type char_ = Str.char_
type string_ = Str.t
val edit_distance : string_ -> string_ -> int
type automaton
val of_string : limit:int -> string_ -> automaton
val of_list : limit:int -> char_ list -> automaton
val debug_print :
(out_channel -> char_ -> unit) -> out_channel -> automaton -> unit
val match_with : automaton -> string_ -> bool
module Index :
sig
type 'b t
val empty : 'b t
val is_empty : 'a t -> bool
val add : 'b t -> string_ -> 'b -> 'b t
val cardinal : 'a t -> int
val remove : 'b t -> string_ -> 'b t
val retrieve : limit:int -> 'b t -> string_ -> 'b klist
val of_list : (string_ * 'b) list -> 'b t
val to_list : 'b t -> (string_ * 'b) list
val add_seq : 'a t -> (string_ * 'a) sequence -> 'a t
val of_seq : (string_ * 'a) sequence -> 'a t
val to_seq : 'a t -> (string_ * 'a) sequence
val add_gen : 'a t -> (string_ * 'a) gen -> 'a t
val of_gen : (string_ * 'a) gen -> 'a t
val to_gen : 'a t -> (string_ * 'a) gen
val fold : ('a -> string_ -> 'b -> 'a) -> 'a -> 'b t -> 'a
val iter : (string_ -> 'b -> unit) -> 'b t -> unit
val to_klist : 'b t -> (string_ * 'b) klist
end
end
type char_ = char
type string_ = string
val edit_distance : string_ -> string_ -> int
type automaton
val of_string : limit:int -> string_ -> automaton
val of_list : limit:int -> char_ list -> automaton
val match_with : automaton -> string_ -> bool
module Index :
sig
type 'b t
val empty : 'b t
val is_empty : 'a t -> bool
val add : 'b t -> string_ -> 'b -> 'b t
val cardinal : 'a t -> int
val remove : 'b t -> string_ -> 'b t
val retrieve : limit:int -> 'b t -> string_ -> 'b klist
val of_list : (string_ * 'b) list -> 'b t
val to_list : 'b t -> (string_ * 'b) list
val add_seq : 'a t -> (string_ * 'a) sequence -> 'a t
val of_seq : (string_ * 'a) sequence -> 'a t
val to_seq : 'a t -> (string_ * 'a) sequence
val add_gen : 'a t -> (string_ * 'a) gen -> 'a t
val of_gen : (string_ * 'a) gen -> 'a t
val to_gen : 'a t -> (string_ * 'a) gen
val fold : ('a -> string_ -> 'b -> 'a) -> 'a -> 'b t -> 'a
val iter : (string_ -> 'b -> unit) -> 'b t -> unit
val to_klist : 'b t -> (string_ * 'b) klist
end
val debug_print : Pervasives.out_channel -> automaton -> unit
end