Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/IBM/Project_CodeNet
/ tokenize
Function
tokenize
model-experiments/masked-language-model/infer.py:53–55 ·
view source on GitHub ↗
(text)
Source
from the content-addressed store, hash-verified
51
52
# Mimick the TextVectorization tokenization.
53
def
tokenize(text):
54
# split at ' '
55
return
text.split()
56
57
# Turns text into list of vocabulary indices.
58
def
encode(text):
Callers
1
encode
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected