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) Hashtbl.t;
  2. mutable i2w : (int, string) Hashtbl.t;
  3. mutable i2f : (int, int) Hashtbl.t;
}
val get_w2i : t -> (string, int) Hashtbl.t
val get_i2w : t -> (int, string) 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) Hashtbl.t -> unit
val trim_percent : float -> float -> t -> t
val _trim_count_w2f : 'a -> 'a -> ('b, 'a) Hashtbl.t -> unit
val trim_count : int -> int -> t -> t
val remove_stopwords : ('a, 'b) Hashtbl.t -> ('a, 'c) Hashtbl.t -> unit
val build : ?lo:float -> ?hi:float -> ?stopwords:(string, 'a) 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.