aboutsummaryrefslogtreecommitdiff
path: root/motus/lib/wordlist.mli
diff options
context:
space:
mode:
Diffstat (limited to 'motus/lib/wordlist.mli')
-rw-r--r--motus/lib/wordlist.mli33
1 files changed, 17 insertions, 16 deletions
diff --git a/motus/lib/wordlist.mli b/motus/lib/wordlist.mli
index 766fbdf..a56cab3 100644
--- a/motus/lib/wordlist.mli
+++ b/motus/lib/wordlist.mli
@@ -1,25 +1,26 @@
+(** The dictionnary *)
+
type t
-val words : t -> string list
+val empty_data : unit -> t
+(** Create an empty dictionnary. The resulting dictionnay cannot be used, it is
+ juste here if required for initialisation *)
+
+val words : t -> string Seq.t
+(** Load all the words *)
val list_size : t -> int
(** Number of words in the list *)
-val empty_data : unit -> t
-
-val add_word : Criteria.t list -> t -> string -> t
-(** Add a new word in the list. Check are made against the differents criteria in order to ensure that the word is valid *)
-
-val remove_word : t -> string -> t
-(** Remove a word from this list *)
+val add_words : Criteria.t list -> string Seq.t -> t
+(** Create a word list from an initial sequence.
-val extract_freq : t -> (char * int) list
-(** Evaluate the score for each char (lower is better) *)
+ Checks are made against the differents criteria in order to ensure that the
+ word is valid *)
-val pick_next_word : t -> (char * int) list -> string * int
-(** Get the word which with the most information in it.
+val filter : Criteria.t list -> t -> t
+(** Remove all the words that does not match the criterias. *)
-The information is the score given to each character, representing each
-frequency in the whole word list (lower is better). If the same letter is
-present many times, we consider that succeding letters does not give any more
-informations (do not consider the position here) *)
+val remove_word : t -> string -> t
+(** Remove a word from this list. This function is called when a proposition
+ from the application is not recognized by the game. *)