Documentation ¶
Index ¶
- Variables
- func Back(table [][]int, str1, str2 string, i, j int) string
- func GenerateDB(stringListPath string, databasePath string, tupleLength int, verbosity bool)
- func GenerateDBInMemory(stringListPath string, tupleLength int, verbosity bool) (words map[int]string, tuples map[string][]int)
- func GetMatch(s string, path string) (string, int, error)
- func GetMatches(s string, path string) ([]string, []int, error)
- func GetMatchesInMemory(s string, wordsLookup map[int]string, tuplesLookup map[string][]int, ...) ([]string, []int, error)
- func GetMatchesInMemoryInParallel(s string, wordsLookup map[int]string, tuplesLookup map[string][]int, ...) ([]string, []int, error)
- func LCS(str1, str2 string) int
- func Max(more ...int) int
- type Pair
- type PairList
- Bugs
Constants ¶
This section is empty.
Variables ¶
var Normalize bool
var VERBOSE bool
VERBOSE is a flag to turn on/off status information during parsing
Functions ¶
func GenerateDB ¶
GenerateDB generates the database with precomputed strings for later searching. It is required to you generate a database before you use the GetMatch() function.
stringListPath is the filename of the list of strings you want to use
databasePath is the filename of the database that is outputed
tupleLength is the length of the subsets you want to use
func GenerateDBInMemory ¶
func GetMatch ¶
GetMatch searches in the specified goagrep database. It returns the closest matched string and the Levenshtein distance.
s is the string you want to search
path is the filename of the database generated with GenerateDB()
func GetMatches ¶
GetMatches searches in the specified goagrep database. Returns the a list of the at most 100 words and scores in order.
s is the string you want to search
path is the filename of the database generated with GenerateDB()
func GetMatchesInMemory ¶
Types ¶
Notes ¶
Bugs ¶
Windows file resize error: https://github.com/schollz/goagrep/issues/6