Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alasdairforsythe/tokenmonster
/ functions
Functions
381 in github.com/alasdairforsythe/tokenmonster
⨍
Functions
381
◇
Types & classes
47
↓ 148 callers
Method
size
tokenmonster-cpp/include/tokenmonster/tokenmonster.hpp:106
↓ 60 callers
Function
max_zero_and
tokenmonster-cpp/src/tokenmonster.cpp:30
↓ 35 callers
Method
longest_substring
tokenmonster-cpp/src/tokenmonster.cpp:786
↓ 35 callers
Function
min_int
tokenmonster-cpp/src/tokenmonster.cpp:28
↓ 28 callers
Function
decodeRune
(b []byte)
training/getalltokens.go:331
↓ 26 callers
Method
resize
Changes the size of the vocabulary and optionally resets the token IDs. A vocabulary can be enlarged as well reduced in size. Only t
python/tokenmonster.py:823
↓ 25 callers
Function
max_int
tokenmonster-cpp/src/tokenmonster.cpp:29
↓ 25 callers
Function
new
Creates a new vocabulary from a YAML string. A sample YAML file can be found here: https://github.com/alasdairforsythe/tokenmonster/yaml_guid
python/tokenmonster.py:58
↓ 25 callers
Function
sendError
(statusCode byte)
training/tokenmonsterserver.go:104
↓ 24 callers
Method
find
tokenmonster-cpp/src/tokenmonster.cpp:699
↓ 21 callers
Method
Len
Returns number of tokens in the vocabulary, inluding UNK token if it is used.
go/tokenmonster.go:2513
↓ 20 callers
Function
equal_to
tokenmonster-cpp/src/tokenmonster.cpp:32
↓ 20 callers
Function
less_than
tokenmonster-cpp/src/tokenmonster.cpp:31
↓ 20 callers
Function
write_byte
tokenmonster-cpp/tests/unit.cpp:12
↓ 19 callers
Function
isLetter
(r rune)
training/getalltokens.go:298
↓ 19 callers
Function
writeUint32
(buf []byte, v uint32)
training/tokenmonsterserver.go:88
↓ 18 callers
Method
PrivateGenerateVocab
Don't use this function, it's exported because it's used by the exportvocab tool.
go/tokenmonster.go:2898
↓ 17 callers
Method
_communicate
(self, job_type, id, data_length, data = None)
python/tokenmonster.py:1036
↓ 14 callers
Method
Decode
Decodes tokens backs into bytes. If you are decoding a stream of tokens individually or in batches, instead of all at once, you should use the Decode
go/tokenmonster.go:788
↓ 14 callers
Method
Normalize
--------- TOKENIZE --------- Applies all normalizations to the bytes, including capcode and NFD.
go/tokenmonster.go:953
↓ 14 callers
Function
die
(msg string, showUsage bool)
training/exportvocab.go:96
↓ 14 callers
Function
formatInt
(v int)
training/trainvocab.go:153
↓ 14 callers
Function
print_hex
tokenmonster-cpp/tests/dump.cpp:15
↓ 13 callers
Function
_read_uint32
(input)
python/tokenmonster.py:1281
↓ 13 callers
Function
isCapcode
(r rune)
training/getalltokens.go:302
↓ 12 callers
Function
isLetter
(r rune, usingCapcode uint8)
go/tokenmonster.go:359
↓ 12 callers
Function
isLetter
(r rune)
training/trainvocab.go:253
↓ 12 callers
Method
read_byte
tokenmonster-cpp/src/tokenmonster.cpp:139
↓ 11 callers
Method
decode
tokenmonster-cpp/src/tokenmonster.cpp:1420
↓ 10 callers
Function
_write_uint64
(input)
python/tokenmonster.py:1275
↓ 10 callers
Function
readUint32
(buf []byte)
training/tokenmonsterserver.go:69
↓ 10 callers
Method
read_uint24
tokenmonster-cpp/src/tokenmonster.cpp:144
↓ 10 callers
Function
unleak
(b []byte)
go/tokenmonster.go:432
↓ 10 callers
Function
writeUint64
(buf []byte, v uint64)
training/tokenmonsterserver.go:73
↓ 9 callers
Method
_file_exists
(cls, fname)
python/tokenmonster.py:1033
↓ 9 callers
Function
_write_uint8
(input)
python/tokenmonster.py:1278
↓ 9 callers
Function
is_iterable
(obj)
python/tokenmonster.py:1290
↓ 9 callers
Function
normalize
(data []byte, usingCapcode uint8, normalizer norm.Normalizer)
go/tokenmonster.go:242
↓ 9 callers
Function
write_uint24
tokenmonster-cpp/tests/unit.cpp:16
↓ 8 callers
Function
String
(b []byte)
training/trainvocab.go:157
↓ 8 callers
Function
_write_uint32
(input)
python/tokenmonster.py:1272
↓ 8 callers
Function
bytes
tokenmonster-cpp/tests/bench.cpp:22
↓ 8 callers
Function
processChunkMulti
(asset workStruct, numChunks int, trim bool, level uint8)
training/getalltokens.go:1236
↓ 8 callers
Method
set
(key, value)
javascript/tokenmonster.js:36
↓ 8 callers
Method
tokenize
Tokenizes a string into tokens according to the vocabulary. You can pass a string or a list of strings. If you pass a list of string
python/tokenmonster.py:410
↓ 7 callers
Function
decodeLastRune
(b []byte)
training/getalltokens.go:361
↓ 7 callers
Function
decodeRune
(b []byte)
training/trainvocab.go:265
↓ 7 callers
Method
findLargestSubarray
(arr)
javascript/tokenmonster.js:68
↓ 7 callers
Function
loadTokensFromFile
(filename string)
training/trainvocab.go:453
↓ 7 callers
Method
modify
Modifies the vocabulary. Doing so invalidates all decoder objects associated with the model before modification. Notes:
python/tokenmonster.py:674
↓ 7 callers
Method
normalize
tokenmonster-cpp/src/tokenmonster.cpp:1361
↓ 6 callers
Function
_read_uint64
(input)
python/tokenmonster.py:1284
↓ 6 callers
Method
decode
(data)
javascript/tokenmonster.js:1015
↓ 6 callers
Function
decodeRune
(b []byte, charsetFlag uint8)
go/tokenmonster.go:371
↓ 6 callers
Function
isAlphaNum
(r rune)
training/trainvocab.go:257
↓ 6 callers
Function
readUint64
(buf []byte)
training/tokenmonsterserver.go:65
↓ 5 callers
Function
containsOnlyNumbers
(input string)
training/getalltokens.go:1604
↓ 5 callers
Method
decode
Decodes tokens into a string. Only use this "decode" method if you are decoding a complete "batch" or complete "conversation".
python/tokenmonster.py:341
↓ 5 callers
Method
flush
tokenmonster-cpp/src/tokenmonster.cpp:1717
↓ 5 callers
Function
isAlphaNum
(r rune, usingCapcode uint8)
go/tokenmonster.go:363
↓ 5 callers
Function
isDelimiter
* func isDelimiter(r rune) bool { if r == '(' || r == ')' || r == '[' || r == ']' || r == '{' || r == '}' || r == '\'' || r == '"' || r == '‘' || r =
training/getalltokens.go:323
↓ 5 callers
Function
isLower
(r)
javascript/tokenmonster.js:884
↓ 5 callers
Function
isModifier
(r)
javascript/tokenmonster.js:896
↓ 5 callers
Function
isNumber
(r)
javascript/tokenmonster.js:892
↓ 5 callers
Function
normalize
(data []byte)
training/trainvocab.go:335
↓ 5 callers
Function
saveTokensToFile
(filename string, data [][]byte, data2 [][]byte, data3 [][]byte, scores []uint32, datasize int, special [][]by
training/trainvocab.go:412
↓ 5 callers
Method
tokenize
tokenmonster-cpp/src/tokenmonster.cpp:3152
↓ 5 callers
Method
tokenize_serialized
tokenmonster-cpp/src/tokenmonster.cpp:3164
↓ 4 callers
Method
Capcode
The capcode level. 0 = disabled, 1 = deleteToken only, 2 = fully enabled.
go/tokenmonster.go:2561
↓ 4 callers
Method
Charset
The charset code for the vocabulary. 0 = None, 1 = UTF-8, 2 = UTF-16.
go/tokenmonster.go:2555
↓ 4 callers
Method
HighestTokenID
Returns the value of the highest token ID.
go/tokenmonster.go:2595
↓ 4 callers
Method
Mode
The original filter for training the vocabulary. 0 = unfiltered, 1 = clean, 2 = balanced, 3 = consistent, 4 = strict, 5 = not trained with trainvocab.
go/tokenmonster.go:2567
↓ 4 callers
Method
_addToBloom
(bloomFilter, key, length)
javascript/tokenmonster.js:26
↓ 4 callers
Method
_bytes_to_string
(self, input)
python/tokenmonster.py:944
↓ 4 callers
Method
_checkBloom
(bloomFilter, key, length)
javascript/tokenmonster.js:31
↓ 4 callers
Method
_hash
(key, length = key.length)
javascript/tokenmonster.js:10
↓ 4 callers
Method
_string_to_bytes
(self, input)
python/tokenmonster.py:952
↓ 4 callers
Function
bytes
tokenmonster-cpp/tests/unit.cpp:81
↓ 4 callers
Method
decode_serialized
tokenmonster-cpp/src/tokenmonster.cpp:1504
↓ 4 callers
Function
escapeYAML
(b *bytes.Buffer, s []byte)
go/tokenmonster.go:3970
↓ 4 callers
Function
flagRequired
(name string, value interface{})
training/trainvocab.go:126
↓ 4 callers
Method
get_dictionary
Returns a dictionary of all tokens in the vocabulary. This returns a list of dictionaries with keys "id", "token", "token_decoded",
python/tokenmonster.py:555
↓ 4 callers
Function
incompleteUTF16Bytes
(bytes []byte)
go/tokenmonster.go:193
↓ 4 callers
Function
incompleteUTF8Bytes
* 'flag' bits: 1 ends with a letter 2 begins with a letter 4 begins with a space OR characterToken OR wordToken 8 ends on capcode 16 begins on
go/tokenmonster.go:149
↓ 4 callers
Function
incomplete_utf16_bytes
tokenmonster-cpp/src/tokenmonster.cpp:112
↓ 4 callers
Function
incomplete_utf8_bytes
tokenmonster-cpp/src/tokenmonster.cpp:83
↓ 4 callers
Function
isAlphaNum
(r rune)
training/getalltokens.go:310
↓ 4 callers
Function
isLetter
(r)
javascript/tokenmonster.js:888
↓ 4 callers
Function
load
Loads a TokenMonster vocabulary from file, URL or by name. Parameters: path (string): A filepath, URL or pre-built vocabulary name.
python/tokenmonster.py:25
↓ 4 callers
Function
nfd
tokenmonster-cpp/src/tokenmonster.cpp:190
↓ 4 callers
Function
run_bench
tokenmonster-cpp/tests/bench.cpp:57
↓ 4 callers
Function
stripLastPunc
* func stripLastPunc(tok []byte) []byte { rlast, nlast := decodeLastRune(tok) if isOther(rlast) { if unicode.IsSpace(rlast) || isDelimiter(rlast)
training/getalltokens.go:426
↓ 4 callers
Function
to_filename
(s)
training/dataset_helpers/download_code_samples.py:19
↓ 4 callers
Function
writeFloatPrintable
(writer io.Writer, value float32)
go/tokenmonster.go:4010
↓ 4 callers
Function
write_token
tokenmonster-cpp/tests/unit.cpp:40
↓ 3 callers
Method
NormalizationCode
The type of normalization applied automatically when tokenizing. Returns a uint8.
go/tokenmonster.go:2579
↓ 3 callers
Method
_connect
(cls)
python/tokenmonster.py:1136
↓ 3 callers
Method
_disconnect
(cls)
python/tokenmonster.py:1018
↓ 3 callers
Method
_download
(cls, url, fname)
python/tokenmonster.py:1029
↓ 3 callers
Method
_format_list
(self, data)
python/tokenmonster.py:960
next →
1–100 of 381, ranked by callers