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

Function write_jsonl_force

tools/utils.py:122–125  ·  view source on GitHub ↗
(data, path, mode="w+",encoding='utf-8')

Source from the content-addressed store, hash-verified

120 for d in data:
121 f.write(json.dumps(d, ensure_ascii=False) + "\n")
122def write_jsonl_force(data, path, mode="w+",encoding='utf-8'):
123 with open(path, mode, encoding=encoding) as f:
124 for d in data:
125 f.write(json.dumps(d, ensure_ascii=False) + "\n")
126def check_test(entities):## 初期用于检测是否有边界错误
127 e_l=[]
128 for layer in entities:

Callers 1

perform_clusteringMethod · 0.90

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected