MCPcopy 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.
72def tokenize(text):
73 # split at ' '
74 return text.split()
75
76# Turns text into list of vocabulary indices.
77def encode(text):

Callers 1

encodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected