diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2022-02-11 09:22:18 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2022-02-11 09:28:26 +0100 |
commit | 82bb54622a47bb092094c8efab8200b12817c5b4 (patch) | |
tree | f160d66a09d2bf0e8f2bdbef5dbec17126ecd4a1 /motus/lib/persistence.mli | |
parent | d20d14b4f4a903ef9aea4c01dd46fab5ecbab6ae (diff) |
Hide structure in motus solver
Diffstat (limited to 'motus/lib/persistence.mli')
-rw-r--r-- | motus/lib/persistence.mli | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/motus/lib/persistence.mli b/motus/lib/persistence.mli new file mode 100644 index 0000000..f5625e4 --- /dev/null +++ b/motus/lib/persistence.mli @@ -0,0 +1,24 @@ +type t + +val words : t -> string list + +val list_size : t -> int +(** Number of words in the list *) + +val empty_data : unit -> t + +val extract_freq : t -> (char * int) list +(** Evaluate the score for each char (lower is better) *) + +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 pick_next_word : t -> (char * int) list -> string * int +(** Get the word which with the most information in it. + +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 |