package catala

  1. Overview
  2. Docs
Compiler and library for the literate programming language for tax code specification

Install

dune-project
 Dependency

Authors

Maintainers

Sources

1.1.0.tar.gz
md5=ec7dda88c5f7f371d2a35874cdae2a10
sha512=7cedccfbe5330992d5730441d6ba7b97446237ff5bb4579498a167f2319ec03e8fae50b7f80e3abe96833744b61ffd10719ce0c3e4c144893a4b7adc77e91b56

doc/catala.catala_utils/Catala_utils/Suggestions/index.html

Module Catala_utils.SuggestionsSource

Sourceval levenshtein_distance : string -> string -> int

levenshtein_distance w1 w2 computes the levenshtein distance separating w1 from w2.

Sourceval best_candidates : string list -> string -> string list

best_candidates suggestions word returns the subset of elements in suggestions that minimize the levenshtein distance to word. Multiple candidates that have a same distance is possible.

Sourceval sorted_candidates : ?max_elements:int -> string list -> string -> string list

sorted_candidates ?max_elements suggestions word sorts the suggestions list and retain at most max_elements (defaults to 5). This list is ordered by their levenshtein distance to word, i.e., the first elements are the most similar.

Sourceval format : Format.formatter -> string list -> unit