From d51918124c75c7a43dd7f420277fce671c791db3 Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Sat, 19 Jul 2025 09:42:38 +0800 Subject: [PATCH] 'commit' --- dsLightRag/Tools/KG_Config.py | 2 +- dsLightRag/Tools/T4_Doc.py | 2 +- dsLightRag/Tools/T5_Chunk.py | 2 +- dsLightRag/Tools/T6_Doc_Chunks.py | 2 +- dsLightRag/Tools/T8_Relationships.py | 4 ++-- .../Tools/__pycache__/KG_Config.cpython-310.pyc | Bin 166 -> 203 bytes 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dsLightRag/Tools/KG_Config.py b/dsLightRag/Tools/KG_Config.py index 9b4e8d45..bf7d9c72 100644 --- a/dsLightRag/Tools/KG_Config.py +++ b/dsLightRag/Tools/KG_Config.py @@ -1 +1 @@ -TOPIC='ChuZhongShuXue' \ No newline at end of file +TOPIC=r'd:\dsWork\dsProject\dsLightRag\Topic\ChuZhongShuXue' \ No newline at end of file diff --git a/dsLightRag/Tools/T4_Doc.py b/dsLightRag/Tools/T4_Doc.py index ae77a6c3..bcf96f7e 100644 --- a/dsLightRag/Tools/T4_Doc.py +++ b/dsLightRag/Tools/T4_Doc.py @@ -2,7 +2,7 @@ import ijson from Tools.KG_Config import TOPIC # 文件路径 -file_path = rf"d:\dsWork\dsProject\dsLightRag\Topic\{TOPIC}\kv_store_doc_status.json" +file_path = rf"{TOPIC}\kv_store_doc_status.json" # 使用ijson流式读取JSON文件 with open(file_path, 'r', encoding='utf-8') as f: diff --git a/dsLightRag/Tools/T5_Chunk.py b/dsLightRag/Tools/T5_Chunk.py index 8df16fe7..de0b9c3d 100644 --- a/dsLightRag/Tools/T5_Chunk.py +++ b/dsLightRag/Tools/T5_Chunk.py @@ -4,7 +4,7 @@ import os from Tools.KG_Config import TOPIC # 文件路径 -file_path = rf"d:\dsWork\dsProject\dsLightRag\Topic\{TOPIC}\vdb_chunks.json" +file_path = rf"{TOPIC}\vdb_chunks.json" # 检查文件是否存在 if not os.path.exists(file_path): diff --git a/dsLightRag/Tools/T6_Doc_Chunks.py b/dsLightRag/Tools/T6_Doc_Chunks.py index 1a0945fd..6e780298 100644 --- a/dsLightRag/Tools/T6_Doc_Chunks.py +++ b/dsLightRag/Tools/T6_Doc_Chunks.py @@ -4,7 +4,7 @@ import os from Tools.KG_Config import TOPIC # 文件路径 -file_path = rf"d:\dsWork\dsProject\dsLightRag\Topic\{TOPIC}\kv_store_text_chunks.json" +file_path = rf"{TOPIC}\kv_store_text_chunks.json" # 检查文件是否存在 if not os.path.exists(file_path): diff --git a/dsLightRag/Tools/T8_Relationships.py b/dsLightRag/Tools/T8_Relationships.py index 6439b991..d85d63ab 100644 --- a/dsLightRag/Tools/T8_Relationships.py +++ b/dsLightRag/Tools/T8_Relationships.py @@ -23,12 +23,12 @@ def parse_relationships(file_path): result = { "embedding_dim": embedding_dim, "relationship_count": len(relationships), - "sample_relationships": relationships[:3] # 显示前3条示例 + "sample_relationships": relationships[:10] # 显示前3条示例 } return result if __name__ == "__main__": - file_path = rf"d:\dsWork\dsProject\dsLightRag\Topic\{TOPIC}\vdb_relationships.json" + file_path = rf"{TOPIC}\vdb_relationships.json" try: relationships = parse_relationships(file_path) print(f"嵌入维度: {relationships['embedding_dim']}") diff --git a/dsLightRag/Tools/__pycache__/KG_Config.cpython-310.pyc b/dsLightRag/Tools/__pycache__/KG_Config.cpython-310.pyc index 9ae09db1be114a069aef80398739dd4b7e67e6f7..1033eef394f7e014d418ff5adc1331c7295989ef 100644 GIT binary patch delta 36 qcmZ3+c$$$npO=@50SLZ*tIDvM$g9m