Text Suggestion Supplier
Interface to supply text command suggestions from a top level name.
Default implementation
The default implementation uses a normalized Levenshtein similarity and does the following:
Get the partial similarity between all commands, keeping 90% similarity and above (partial similarity compares the shortest substring of both the command name and the user input)
Get the similarity of the remaining commands, keeping 42% similarity and above
See also
@InterfacedService
Functions
Link copied to clipboard
abstract fun getSuggestions(topLevelName: String, candidates: List<TopLevelTextCommandInfo>): Collection<TopLevelTextCommandInfo>
Computes command suggestions from the user input and the available commands.