MCPcopy Create free account
hub / github.com/THUDM/GLM / EncodeAsIds

Method EncodeAsIds

data_utils/tokenization.py:515–520  ·  view source on GitHub ↗

Preprocess text and encode as ids. Return a tokenization object with original text, processed text, and id tokenization.

(self, text, process_fn=None)

Source from the content-addressed store, hash-verified

513 raise NotImplementedError('TextTokenizer Train not implemented')
514
515 def EncodeAsIds(self, text, process_fn=None):
516 """
517 Preprocess text and encode as ids. Return a tokenization object with
518 original text, processed text, and id tokenization.
519 """
520 raise NotImplementedError('TextTokenizer EncodeAsIds not implemented')
521
522 def EncodeAsTokens(self, text, process_fn=None):
523 """

Callers 1

__call__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected