MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / encode

Method encode

utils/tokenizer.py:53–56  ·  view source on GitHub ↗
(self, text: str)

Source from the content-addressed store, hash-verified

51 self.chars_per_token = chars_per_token
52
53 def encode(self, text: str) -> List[int]:
54 # Return pseudo list of estimated token count
55 estimated_count = int(len(text) / self.chars_per_token)
56 return list(range(estimated_count))
57
58 def decode(self, tokens: List[int]) -> str:
59 # Cannot truly decode, return empty string

Callers

nothing calls this directly

Calls 1

listFunction · 0.50

Tested by

no test coverage detected