WangXuMing hace 3 semanas
padre
commit
243451de10

+ 1 - 1
README_test.md

@@ -1,2 +1,2 @@
 # 测试模块运行环境配置
-$env:PYTHONPATH = "D:\wx_work\sichuan_luqiao\LQAgentPlatform"
+$env:PYTHONPATH = "D:\wx_work\sichuan_luqiao\LQAgentPlatform"

+ 2 - 2
core/construction_review/component/doc_worker/classification/chunk_classifier.py

@@ -44,9 +44,9 @@ class ChunkClassifier:
         with csv_file.open("r", encoding="utf-8-sig") as f:
             reader = csv.DictReader(f)
             for row in reader:
-                first_code = (row.get("first_contents_code") or "").strip()
+                first_code = (row.get("first_code") or "").strip()
                 first_cn = (row.get("first_name") or "").strip()
-                second_code = (row.get("second_contents_code") or "").strip()
+                second_code = (row.get("second_code") or "").strip()
                 second_cn = (row.get("second_name") or "").strip()
                 second_focus = (row.get("second_focus") or "").strip()
                 third_code = (row.get("third_code") or "").strip()

+ 1 - 1
core/construction_review/component/doc_worker/config/StandardCategoryTable.csv

@@ -1,4 +1,4 @@
-first_contents_code,first_name,second_contents_code,second_name,second_focus,third_code,third_name,third_focus
+first_code,first_name,second_code,second_name,second_focus,third_code,third_name,third_focus
 basis,编制依据,LawsAndRegulations,法律法规,NULL,NationalLawsAndRegulations,国家政府发布的法律法规与规章制度,国家级、法律、法规、规章、强制力、普遍适用、基础框架、顶层设计、行业准则、合规性、统一标准、权威性、强制性条文、基本要求。
 basis,编制依据,LawsAndRegulations,法律法规,NULL,ProvincialLawsAndRegulationsOfProjectLocation,工程所在地省级政府发布的法律法规与规章制度,地方性、区域性、细化补充、因地制宜、执行细则、地方特色、适应性要求、属地管理、动态调整、配套政策、本地化实施。
 basis,编制依据,StandardsAndSpecifications,标准规范,NULL,IndustryStandards,行业标准,需符合国家/行业强制或推荐性标准(如GB/T、JTG等)、时效性强(需跟踪最新版)、覆盖全生命周期(设计→施工→运维)、是定义工程项目的最低技术要求、质量验收准则、安全红线。

+ 0 - 44
core/construction_review/component/doc_worker/config/remove_prefix.py

@@ -1,44 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-"""
-去除 construction_plan_standards.csv 中 first_zh_code 列前的序号
-"""
-
-import csv
-import re
-from pathlib import Path
-
-# 文件路径
-CSV_PATH = Path(__file__).parent / "construction_plan_standards.csv"
-
-def remove_chinese_number_prefix(text):
-    """去除中文数字序号前缀,如 '一、'、'二、' 等"""
-    # 匹配中文数字+顿号的模式
-    pattern = r'^[一二三四五六七八九十]+、'
-    return re.sub(pattern, '', text)
-
-def main():
-    # 读取CSV文件
-    rows = []
-    with open(CSV_PATH, 'r', encoding='utf-8-sig') as f:
-        reader = csv.DictReader(f)
-        fieldnames = reader.fieldnames
-        print(f"列名: {fieldnames}")
-        for row in reader:
-            old_value = row.get('first_zh_code', '')
-            new_value = remove_chinese_number_prefix(old_value)
-            if old_value != new_value:
-                print(f"修改: '{old_value}' -> '{new_value}'")
-            row['first_zh_code'] = new_value
-            rows.append(row)
-
-    # 写回CSV文件(不带BOM)
-    with open(CSV_PATH, 'w', encoding='utf-8', newline='') as f:
-        writer = csv.DictWriter(f, fieldnames=fieldnames)
-        writer.writeheader()
-        writer.writerows(rows)
-
-    print(f"已处理 {len(rows)} 行数据,序号已去除。")
-
-if __name__ == "__main__":
-    main()

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 45
core/construction_review/component/doc_worker/config/第四章_专项施工方案内容要求_完整版(1).csv


+ 1 - 1
core/construction_review/component/doc_worker/utils/prompt_loader.py

@@ -56,7 +56,7 @@ class PromptLoader:
         with self._csv_file.open("r", encoding="utf-8-sig") as f:  # 使用 utf-8-sig 自动处理 BOM
             reader = csv.DictReader(f)
             for row in reader:
-                # 新CSV格式:first_contents_code, first_name, second_contents_code, second_name
+                # 新CSV格式:first_code, first_name, second_code, second_name
                 level1 = (row.get("first_name") or "").strip()
                 level2 = (row.get("second_name") or "").strip()
                 

+ 2 - 2
core/construction_review/component/reviewers/completeness_reviewer.py

@@ -102,8 +102,8 @@ class TertiarySpecLoader:
             
             # 遍历构建标准树
             for _, row in df.iterrows():
-                first_code = str(row.get('first_contents_code', '')).strip()
-                second_code = str(row.get('second_contents_code', '')).strip()
+                first_code = str(row.get('first_code', '')).strip()
+                second_code = str(row.get('second_code', '')).strip()
                 third_code = str(row.get('third_contents_code', '')).strip()
                 
                 if not all([first_code, second_code, third_code]):

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio