MCPcopy Create free account
hub / github.com/TIGER-AI-Lab/LongRAG / Tokenizer

Class Tokenizer

utils/tokenizers.py:129–141  ·  view source on GitHub ↗

Base tokenizer class. Tokenizers implement tokenize, which should return a Tokens class.

Source from the content-addressed store, hash-verified

127
128
129class Tokenizer(object):
130 """Base tokenizer class.
131 Tokenizers implement tokenize, which should return a Tokens class.
132 """
133
134 def tokenize(self, text):
135 raise NotImplementedError
136
137 def shutdown(self):
138 pass
139
140 def __del__(self):
141 self.shutdown()
142
143
144class SimpleTokenizer(Tokenizer):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected