MCPcopy 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.
53def tokenize(text):
54 # split at ' '
55 return text.split()
56
57# Turns text into list of vocabulary indices.
58def encode(text):

Callers 1

encodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected