main
HuangHai 4 days ago
parent 1e19c64435
commit a9f32c08bb

@ -0,0 +1 @@
TOPIC='ChuZhongShuXue'

@ -1,8 +1,10 @@
import json
import os
from Tools.KG_Config import TOPIC
# 文件路径
file_path = r"d:\dsWork\dsProject\dsLightRag\Topic\JiHe\kv_store_doc_status.json"
file_path = rf"d:\dsWork\dsProject\dsLightRag\Topic\{TOPIC}\kv_store_doc_status.json"
# 读取并解析JSON文件
with open(file_path, 'r', encoding='utf-8') as f:
@ -13,8 +15,8 @@ for doc_id, status_info in doc_status_data.items():
print(f"文档ID: {doc_id}")
print(f"状态: {status_info['status']}")
print(f"分块数量: {status_info['chunks_count']}")
#print(f"内容摘要: {status_info['content_summary'][:100]}...") # 打印前100字符
#print(f"内容长度: {status_info['content_length']}字符")
print(f"内容摘要: {status_info['content_summary'][:100]}...") # 打印前100字符
print(f"内容长度: {status_info['content_length']}字符")
#print(f"创建时间: {status_info['created_at']}")
#print(f"更新时间: {status_info['updated_at']}")
#print(f"文件路径: {status_info['file_path']}")

@ -1,7 +1,9 @@
import json
from Tools.KG_Config import TOPIC
# 文件路径
file_path = r"d:\dsWork\dsProject\dsLightRag\Topic\ChuZhongShuXue\vdb_chunks.json"
file_path = rf"d:\dsWork\dsProject\dsLightRag\Topic\{TOPIC}\vdb_chunks.json"
# 读取并解析JSON文件
with open(file_path, 'r', encoding='utf-8') as f:

@ -1,7 +1,9 @@
import json
from Tools.KG_Config import TOPIC
# 文件路径
file_path = r"d:\dsWork\dsProject\dsLightRag\Topic\ChuZhongShuXue\vdb_entities.json"
file_path = rf"d:\dsWork\dsProject\dsLightRag\Topic\{TOPIC}\vdb_entities.json"
# 读取并解析JSON文件
with open(file_path, 'r', encoding='utf-8') as f:

@ -1,7 +1,9 @@
import json
from Tools.KG_Config import TOPIC
# 文件路径
file_path = r"d:\dsWork\dsProject\dsLightRag\Topic\JiHe\kv_store_text_chunks.json"
file_path = rf"d:\dsWork\dsProject\dsLightRag\Topic\{TOPIC}\kv_store_text_chunks.json"
# 读取并解析JSON文件
with open(file_path, 'r', encoding='utf-8') as f:

@ -1,6 +1,9 @@
import json
import os
from Tools.KG_Config import TOPIC
def parse_relationships(file_path):
# 检查文件是否存在
if not os.path.exists(file_path):
@ -19,7 +22,7 @@ def parse_relationships(file_path):
return result
if __name__ == "__main__":
file_path = r"d:\dsWork\dsProject\dsLightRag\Topic\JiHe\vdb_relationships.json"
file_path = rf"d:\dsWork\dsProject\dsLightRag\Topic\{TOPIC}\vdb_relationships.json"
try:
relationships = parse_relationships(file_path)
print(f"嵌入维度: {relationships['embedding_dim']}")

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save