MCPcopy Create free account

hub / github.com/alasdairforsythe/tokenmonster / functions

Functions381 in github.com/alasdairforsythe/tokenmonster

Method__del__
(self)
python/tokenmonster.py:183
Method__del__
(self)
python/tokenmonster.py:263
Method__init__
(self, parent)
python/tokenmonster.py:130
Method__init__
(self, path, multiprocess_safe = False)
python/tokenmonster.py:190
Method__len__
(self)
python/tokenmonster.py:270
Methodadd_special_token
Add one or more special tokens. Returns: int: The new size of the vocabulary.
python/tokenmonster.py:814
Methodadd_token
Add one or more regular tokens. Returns: int: The new size of the vocabulary.
python/tokenmonster.py:767
Methodbinary_find
tokenmonster-cpp/src/tokenmonster.cpp:1200
Methodbinary_longest
tokenmonster-cpp/src/tokenmonster.cpp:1221
Methodby_value
tokenmonster-cpp/src/tokenmonster.cpp:915
Methodbytes2uint64
tokenmonster-cpp/src/tokenmonster.cpp:919
Methodcapcode
Returns the capcode level of the vocabulary. 0 = disabled 1 = only deleteToken 2 = enabled
python/tokenmonster.py:279
Methodcharset
Returns one of "UTF-8", "UTF-16", "None"
python/tokenmonster.py:288
Methodconstructor
()
javascript/tokenmonster.js:2
Methodconstructor
()
javascript/tokenmonster.js:183
Methodconstructor
()
javascript/tokenmonster.js:253
Methodconstructor
()
javascript/tokenmonster.js:1008
Methoddebug
(index)
javascript/tokenmonster.js:239
Methoddecode
A decoder object used for decoding token streams. This decoder object is used instead of the vocabulary decode method when y
python/tokenmonster.py:136
Methoddecode_serialized_raw
tokenmonster-cpp/src/tokenmonster.cpp:1427
Methoddecoder
Returns a new decoder instance used for decoding tokens into text.
python/tokenmonster.py:273
Methoddelete_token
Delete one or more regular or special tokens. You can give the token in either its encoded or decoded form. Returns:
python/tokenmonster.py:776
Methoddelete_token_by_id
Delete one or more regular or special token by specifying the token ID. Returns: int: The new size of the vocabulary.
python/tokenmonster.py:786
Methoddenormalize
tokenmonster-cpp/src/tokenmonster.cpp:3248
Methoddetokenize
(tokens)
javascript/tokenmonster.js:258
Methoddisable_unk_token
Disables the UNK token. Without an UNK token, any character for which there is no token is ignored during tokenization Retur
python/tokenmonster.py:860
Functiondisconnect
Closes tokenmonsterserver subprocess.
python/tokenmonster.py:19
Methodenable_unk_token
Enables the UNK token. If enabled, the UNK token appears whenever there is a character that is not in the vocabulary. Note th
python/tokenmonster.py:848
Methodexport_yaml
(self, order_by_score = False)
python/tokenmonster.py:893
Methodfind0
tokenmonster-cpp/src/tokenmonster.cpp:960
Methodfind1
tokenmonster-cpp/src/tokenmonster.cpp:1111
Methodfind2
tokenmonster-cpp/src/tokenmonster.cpp:1156
Methodfind3
tokenmonster-cpp/src/tokenmonster.cpp:1170
Methodfind4
tokenmonster-cpp/src/tokenmonster.cpp:1184
Methodhas_unk
tokenmonster-cpp/include/tokenmonster/tokenmonster.hpp:105
Methodhighest_token_id
tokenmonster-cpp/src/tokenmonster.cpp:3255
Methodid_to_token
Get the token string from a single token ID, in it's capcode-encoded form. Parameters: id: int Returns:
python/tokenmonster.py:610
Methodid_to_token_decoded
Get the token string from a single token ID, in it's capcode-decoded form. Parameters: id: int Returns:
python/tokenmonster.py:627
FunctionisLatin
(b []byte)
training/getalltokens.go:230
FunctionisValid
(b []byte)
training/getalltokens.go:241
FunctionisValidLatin
(b []byte)
training/getalltokens.go:271
Methodload
(url)
javascript/tokenmonster.js:303
Functionload_multiprocess_safe
Loads a TokenMonster vocabulary from file, URL or by name. It's safe for multiprocessing, but vocabulary modification is disabled and tokeniz
python/tokenmonster.py:42
Methodlongest_length
tokenmonster-cpp/src/tokenmonster.cpp:879
Functionmain
tokenmonster-cpp/tests/smoke.cpp:4
Functionmain
tokenmonster-cpp/tests/bench.cpp:84
Functionmain
tokenmonster-cpp/tests/unit.cpp:87
Functionmain
tokenmonster-cpp/tests/dump.cpp:31
Functionmain
()
benchmark/tokenmonster_bench.go:11
Functionmain
()
benchmark/onlyvalidlatin.go:29
Functionmain
()
training/mergetokens.go:107
Functionmain
()
training/tokenmonsterserver.go:184
Functionmain
()
training/getalltokens.go:1613
Functionmain
()
training/trainvocab.go:1347
Functionmain
()
training/exportvocab.go:104
Functionmain
()
training/comparetokens.go:40
Methodmode
Returns the optimization mode of the vocabulary.
python/tokenmonster.py:298
Methodmode
tokenmonster-cpp/include/tokenmonster/tokenmonster.hpp:110
Methodmodify_from_yaml
Modifies the vocabulary using a YAML file. A sample YAML file can be found here: https://github.com/alasdairforsythe/tokenmonster/yam
python/tokenmonster.py:740
Methodnormalization
Returns the normalization of the vocabulary, e.g. "NFD trim"
python/tokenmonster.py:315
Methodnormalization_code
tokenmonster-cpp/include/tokenmonster/tokenmonster.hpp:111
Methodoperator()
tokenmonster-cpp/src/tokenmonster.cpp:908
Methodpack8
tokenmonster-cpp/src/tokenmonster.cpp:953
Methodread_uint32
tokenmonster-cpp/src/tokenmonster.cpp:153
Methodrequire
tokenmonster-cpp/src/tokenmonster.cpp:182
Methodreset_token_ids
Resets the token IDs to be sequential beginning from zero. If tokens have been deleted from the vocabulary there will be gaps in the
python/tokenmonster.py:839
Functionset_local_directory
The default directory for TokenMonster is ~/_tokenmonster Use this function to set the default directory elsewhere, before loading any vocabu
python/tokenmonster.py:12
Methodsort_limit
tokenmonster-cpp/src/tokenmonster.cpp:1229
Methodspecial_tokens
tokenmonster-cpp/src/tokenmonster.cpp:3212
Methodtoken_to_id
Returns the ID of a single token. This works for both capcode-encoded "raw" tokens, and their decoded form. Parameters:
python/tokenmonster.py:644
Methodtokenize
(text)
javascript/tokenmonster.js:446
Methodtokenize_count
Same as tokenize, but it returns only the number of tokens. The number of tokens is the same as you would get from `tokenize`. If yo
python/tokenmonster.py:485
Methodtokenize_count_normalized
tokenmonster-cpp/src/tokenmonster.cpp:1994
Methodtokenize_to_serialized16
tokenmonster-cpp/src/tokenmonster.cpp:2261
Methodtokenize_to_serialized24
tokenmonster-cpp/src/tokenmonster.cpp:2547
Methodtokenize_to_serialized32
tokenmonster-cpp/src/tokenmonster.cpp:2844
Methodtokens
tokenmonster-cpp/src/tokenmonster.cpp:3228
Methodtokens_detailed
tokenmonster-cpp/src/tokenmonster.cpp:3186
Functiontrim
(b []byte)
training/getalltokens.go:391
Methodunk
tokenmonster-cpp/include/tokenmonster/tokenmonster.hpp:104
Methodunk_token_id
Returns the ID of the UNK token, or 'None' type if there is no UNK token Parameters: token: string Returns:
python/tokenmonster.py:660
← previous301–381 of 381, ranked by callers