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

Function write_jsonl

tools/utils.py:118–121  ·  view source on GitHub ↗
(data, path, mode="a",encoding='utf-8')

Source from the content-addressed store, hash-verified

116 return None
117
118def write_jsonl(data, path, mode="a",encoding='utf-8'):
119 with open(path, mode, encoding=encoding) as f:
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:

Callers 8

hierarchical_clusteringFunction · 0.90
truncate_dataFunction · 0.90
deal_duplicate_entityFunction · 0.90
process_tripleFunction · 0.90
triple_extractionFunction · 0.90
extract_descFunction · 0.90
process_single_fileFunction · 0.90
process_tripleFunction · 0.90

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected