package owl

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

NLP: Vocabulary module

type t = {
  1. mutable w2i : (string, int) Stdlib.Hashtbl.t;
  2. mutable i2w : (int, string) Stdlib.Hashtbl.t;
  3. mutable i2f : (int, int) Stdlib.Hashtbl.t;
}
val get_w2i : t -> (string, int) Stdlib.Hashtbl.t
val get_i2w : t -> (int, string) Stdlib.Hashtbl.t
val exits_w : t -> string -> bool
val exits_i : t -> int -> bool
val word2index : t -> string -> int
val index2word : t -> int -> string
val length : t -> int
val freq_i : t -> int -> int
val freq_w : t -> string -> int
val copy : t -> t
val re_index : t -> t
val _trim_percent_w2f : float -> float -> ('a, int) Stdlib.Hashtbl.t -> unit
val trim_percent : float -> float -> t -> t
val _trim_count_w2f : 'a -> 'a -> ('b, 'a) Stdlib.Hashtbl.t -> unit
val trim_count : int -> int -> t -> t
val remove_stopwords : ('a, 'b) Stdlib.Hashtbl.t -> ('a, 'c) Stdlib.Hashtbl.t -> unit
val build : ?lo:float -> ?hi:float -> ?stopwords:(string, 'a) Stdlib.Hashtbl.t -> string -> t
val sort_freq : ?inc:bool -> t -> (int * int) array
val top : t -> int -> (string * int) array
val bottom : t -> int -> (string * int) array
val w2i_to_tuples : t -> (string * int) list
val save : 'a -> string -> unit
val load : string -> t
val save_txt : t -> string -> unit
OCaml

Innovation. Community. Security.