Documentation ¶ Overview ¶ Package textdist calcule des distances d'édition pour suggérer le mot le plus proche (nom d'image, clé Compose). Index ¶ func Closest(word string, candidates []string, maxDist int) (string, bool) func Distance(a, b string) int Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Closest ¶ func Closest(word string, candidates []string, maxDist int) (string, bool) Closest renvoie le candidat le plus proche de word si sa distance est comprise entre 1 et maxDist. En cas d'égalité, le premier candidat de la liste l'emporte. Un candidat identique à word n'est jamais proposé : il n'y a rien à corriger. func Distance ¶ func Distance(a, b string) int Distance renvoie la distance de Levenshtein entre a et b, calculée sur les runes. Types ¶ This section is empty. Source Files ¶ View all Source files doc.golevenshtein.go Click to show internal directories. Click to hide internal directories.