Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/argusdusty/Ferret
/ functions
Functions
15 in github.com/argusdusty/Ferret
⨍
Functions
15
◇
Types & classes
2
↓ 14 callers
Method
Query
Query returns the strings which contain the query, and their stored values unsorted Input: Word: The substring to search for. ResultsLimit: Limit the
ferret.go:203
↓ 9 callers
Method
SortedQuery
SortedQuery returns the strings which contain the query sorted The function sorter produces a value to sort by (largest first) Input: Word: The substr
ferret.go:239
↓ 8 callers
Method
Search
Search performs an exact substring search for the query in the word dictionary Returns the boundaries (low/high) of sorted suffixes which have the que
ferret.go:130
↓ 8 callers
Method
SortedErrorCorrectingQuery
SortedErrorCorrectingQuery returns the strings which contain the query Sorted. The function sorter produces a value to sort by (largest first) Will se
ferret.go:371
↓ 5 callers
Method
ErrorCorrectingQuery
ErrorCorrectingQuery returns the strings which contain the query Unsorted, I think it's partially sorted alphabetically Will search for all substrings
ferret.go:314
↓ 3 callers
Method
Insert
Insert adds a word to the dictionary that IS was built on. This is pretty slow, because of linear-time insertion into an array, so stick to New when y
ferret.go:102
↓ 1 callers
Function
ToASCII
ToASCII converts a single unicode rune to the ASCII equivalent using the UnicodeToASCII table
unicodeconvert.go:48
Function
ErrorCorrect
ErrorCorrect returns all byte-arrays which are Levenshtein distance of 1 away from Word within an allowed array of byte characters.
errorcorrect.go:60
Method
Len
()
ferret.go:46
Method
Less
Equivalent to: bytes.Compare(S.Words[S.WordIndex[i]][S.SuffixIndex[i]:], S.Words[S.WordIndex[j]][S.SuffixIndex[j]:]) <= 0 but faster
ferret.go:53
Function
New
New creates an inverted suffix from a dictionary of byte arrays, mapping data, and a string->[]byte converter
ferret.go:78
Method
Swap
(i, j int)
ferret.go:41
Function
UnicodeToLowerASCII
UnicodeToLowerASCII converts a unicode string to ASCII bytes using the UnicodeToASCII table
unicodeconvert.go:57
Function
main
()
example/dictionaryexample.go:35
Function
main
()
example/example.go:56