Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Identifiers ¶ added in v0.20.0
Identifiers returns up to n candidates closest to the input, for short names such as column names. The fractional gate Suggest uses is too tight for them: a one-character slip in a three-character name already exceeds a quarter of its length, so "N5O" would suggest nothing. A candidate qualifies here when either name contains the other or their case-insensitive edit distance is at most 2, the bound cobra applies to command names. Results are ordered by distance, then by the order the candidates were given.
func Suggest ¶
Suggest returns up to n species names closest to the input, limited to plausible near-spellings (see plausible). It returns nothing when no candidate is close, so callers can distinguish "did you mean X?" from "no such name exists here". Levenshtein distance is computed case-insensitively; substring matches get their distance halved as a relevance boost.
Types ¶
This section is empty.