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/test.py:72–74 ·
view source on GitHub ↗
(text)
Source
from the content-addressed store, hash-verified
70
71
# Mimick the TextVectorization tokenization.
72
def
tokenize(text):
73
# split at ' '
74
return
text.split()
75
76
# Turns text into list of vocabulary indices.
77
def
encode(text):
Callers
1
encode
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected