Help us shape the future of Go! Take the 2026 Go Developer Survey

textdist

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package textdist calcule des distances d'édition pour suggérer le mot le plus proche (nom d'image, clé Compose).

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL