MCPcopy Index your code
hub / github.com/KnowledgeXLab/LeanRAG / get_chunk

Function get_chunk

GraphExtraction/chunk.py:15–20  ·  view source on GitHub ↗
(chunk_file)

Source from the content-addressed store, hash-verified

13
14
15def get_chunk(chunk_file):
16 doc_name=os.path.basename(chunk_file).rsplit(".",1)[0]
17 with open(chunk_file, "r") as f:
18 corpus=json.load(f)
19 chunks = {item["hash_code"]: item["text"] for item in corpus}
20 return chunks
21
22async def triple_extraction(chunks,use_llm_func,output_dir):
23

Callers 1

chunk.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected