MCPcopy Create free account
hub / github.com/Enfoirer/Text2GraphRAG / encode

Method encode

nano_graphrag/_utils.py:148–150  ·  view source on GitHub ↗
(self, text: str)

Source from the content-addressed store, hash-verified

146 return self._tokenizer
147
148 def encode(self, text: str) -> list[int]:
149 self._lazy_load_tokenizer()
150 return self._tokenizer.encode(text)
151
152 def decode(self, tokens: list[int]) -> str:
153 self._lazy_load_tokenizer()

Callers 10

chunking_by_seperatorsFunction · 0.80
get_chunksFunction · 0.80
compute_mdhash_idFunction · 0.80
compute_args_hashFunction · 0.80
upsertMethod · 0.80

Calls 1

_lazy_load_tokenizerMethod · 0.95

Tested by

no test coverage detected