Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AlexWan0/infini-gram
/ functions
Functions
139 in github.com/AlexWan0/infini-gram
⨍
Functions
139
◇
Types & classes
13
↓ 1 callers
Function
sais_32
(text []int32, textMax int, sa, tmp []int32)
suffixarray/sais2.go:86
↓ 1 callers
Function
sais_64
(text []int64, textMax int, sa, tmp []int64)
suffixarray/sais2.go:148
↓ 1 callers
Method
set
(i int, v int64)
suffixarray/suffixarray.go:58
↓ 1 callers
Function
splitAt
Source: https://stackoverflow.com/a/57232670
files.go:117
↓ 1 callers
Function
text_32
text_32 returns the suffix array for the input text. It requires that len(text) fit in an int32 and that the caller zero sa.
suffixarray/sais.go:135
↓ 1 callers
Function
text_64
(text []byte, sa []int64)
suffixarray/sais2.go:17
↓ 1 callers
Function
tokenizeMultiprocess
Tokenize a file from filename using numWorkers processes and writes the resulting tokenized data to outpath. The tokenizer configuration file path is
tokenize.go:64
↓ 1 callers
Function
unmap_32
(text []int32, sa []int32, numLMS int)
suffixarray/sais2.go:1291
↓ 1 callers
Function
unmap_64
(text []int64, sa []int64, numLMS int)
suffixarray/sais2.go:1317
↓ 1 callers
Function
unmap_8_32
unmap_8_32 unmaps the subproblem back to the original. sa[:numLMS] is the LMS-substring numbers, which don't matter much anymore. sa[len(sa)-numLMS:]
suffixarray/sais.go:734
↓ 1 callers
Function
unmap_8_64
(text []byte, sa []int64, numLMS int)
suffixarray/sais2.go:1265
↓ 1 callers
Function
worker
(wg *sync.WaitGroup, tokenizerConfig string, sentinalVal int, sentinalSize int, textJobs <-chan *string, resul
tokenize.go:23
↓ 1 callers
Function
writeIndicesToFile
Writes the even indices into filename with offset added to each value. For writing the suffix array indices to disk: only the even indices align with
files.go:19
↓ 1 callers
Function
writeInt
writeInt writes an int x to w using buf to buffer the write.
suffixarray/suffixarray.go:88
↓ 1 callers
Function
writeSlice
writeSlice writes data[:n] to w and returns n. It uses buf to buffer the write.
suffixarray/suffixarray.go:103
↓ 1 callers
Function
writeStringToFile
(filename string, data string)
files.go:296
↓ 1 callers
Function
writeWorker
(wg *sync.WaitGroup, filename string, results <-chan []byte)
tokenize.go:42
Method
Bytes
Bytes returns the data over which the index was created. It must not be modified.
suffixarray/suffixarray.go:232
Method
FindAllIndex
FindAllIndex returns a sorted list of non-overlapping matches of the regular expression r, where a match is a pair of indices specifying the matched s
suffixarray/suffixarray.go:286
Method
GenerateGreedy
Will generate a sequence of numNewTokens tokens greedily using the longest matched suffix. For a suffix to be considered valid, there must be at least
infinigram.go:104
Function
New
New creates a new [Index] for data. [Index] creation time is O(N) for N = len(data).
suffixarray/suffixarray.go:75
Function
Text_32
(text []byte, sa []int32)
suffixarray/sais.go:125
Method
get
(idx int64)
sa_map.go:21
Method
get
(idx int64)
sa_map.go:45
Method
get
(i int)
suffixarray/suffixarray.go:51
Method
getSlice
(start int64, end int64)
data_map.go:20
Method
getSlice
(start int64, end int64)
data_map.go:49
Method
length
()
sa_map.go:13
Method
length
()
sa_map.go:25
Method
length
()
sa_map.go:66
Method
length
()
data_map.go:24
Method
length
()
data_map.go:70
Function
loadMemArray
(filepath string)
data_map.go:28
Function
main
()
infinigram.go:295
Function
makeMemSA
(filepath string)
sa_map.go:29
Function
printsVec
(vec []int)
utils.go:56
Method
retrieveNum
Retrieve the number of continuations. Sums over results from each chunk.
suffixarray_utils.go:44
Method
retrieveSubstrings
(vec TokenArray, query []byte, extend int64)
suffixarray_utils.go:61
Function
uint32ToInt
(vec []uint32)
utils.go:35
← previous
101–139 of 139, ranked by callers