spellcheck

package
v12.41.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package spellcheck provides spellcheck based on Damerau–Levenshtein distance algorithm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is spellcheck model struct

func Train

func Train(words []string) *Model

Train trains words by given string slice

func (*Model) Correct

func (m *Model) Correct(word string) string

Correct corrects given value

func (*Model) Suggest

func (m *Model) Suggest(word string, max int) []string

Suggest suggests words for given word or word part

Jump to

Keyboard shortcuts

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