7.0 KiB
Executable File
7.0 KiB
Executable File
根目录整理方案
📊 当前状况
| 类型 | 数量 | 示例 |
|---|---|---|
| Markdown文档 | 59个 | CHANGELOG*.md, *_REPORT.md, *_PLAN.md |
| 提取器 | 25个 | extractor_*.py |
| Shell脚本 | 6个 | *.sh |
| 其他 | 大量 | test_.py, rule_base.json, config文件 |
📁 建议目录结构
gene-family-mas-v2/
├── docs/ # 📚 文档目录
│ ├── changelogs/ # 变更日志
│ ├── reports/ # 报告文档
│ ├── plans/ # 计划文档
│ ├── analysis/ # 分析文档
│ └── guides/ # 指南文档
├── extractors/ # 🔧 提取器目录
│ ├── current/ # 当前使用
│ │ ├── fusion/ # PC融合版
│ │ └── llm/ # LLM提取器
│ └── archive/ # 归档版本
├── scripts/ # 📜 脚本目录
│ ├── shell/ # Shell脚本
│ └── utils/ # 工具脚本
├── tests/ # 🧪 测试文件
├── config/ # ⚙️ 配置文件
├── data/ # 📊 数据文件
│ ├── rule_bases/ # 规则库
│ └── samples/ # 样本数据
└── [根目录保留核心文件] # 精简后的根目录
🗂️ 具体整理方案
1. Markdown文档 → docs/
changelogs/ (7个)
CHANGELOG.md
CHANGELOG_2026-04-05.md
CHANGELOG_2026-04-08.md
CHANGELOG_2026-04-09.md
CHANGELOG_2026-04-09-V12.1.md
revision_log_0330.md
revision_logs/
reports/ (15个)
COMPARISON_REPORT.md
COMPARISON_RESULT.md
DATA_QUALITY_REPORT.md
FINAL_COMPLETE_REPORT.md
FINAL_QUALITY_REPORT.md
FINAL_STATUS_REPORT.md
FINAL_SUMMARY.md
FINAL_TEST_REPORT.md
kg_completion_report.md
kg_validation_report.md
LLM_TEST_REPORT.md
prompt_v2_evaluation_report.md
QUALITY_COMPARISON_RESULT.md (假设存在)
V12_1_FIX_SUMMARY.md
V2_STATUS.md
plans/ (8个)
10DAY_DELIVERY_PLAN.md
COMPLETE_PROJECT_PLAN.md
INTEGRATION_PLAN.md
OPTIMIZATION_PLAN.md
PROJECT_ORGANIZE_STATUS.md
PROJECT_RECORD.md
PROJECT_STATUS.md
PROJECT_STRUCTURE.md
REVISION_PLAN.md
analysis/ (12个)
AUTOSKG_INSIGHTS.md
COMPETITIVE_ANALYSIS.md
CRITICAL_ANALYSIS.md
DEEP_COMPARISON.md
extract_phylogeny_v4_README.md
kg_expression_solution.md
KG_TYPE_STATUS.md
multi_agent_analysis.md
MULTI_AGENT_SUMMARY.md
PC_COMPARISON_ANALYSIS.md
PC_COMPARISON_PLAN.md
PC_METHOD_SUMMARY.md
pc_workflow_analysis.md
PLANTSCIENCE_AI_STATUS.md
PLANTSCIENCE_AI_TECH_ANALYSIS.md
REVIEW_MECHANISM_ANALYSIS.md
THREE_METHODS_COMPARISON.md
guides/ (5个)
EXTRACTOR_CATALOG.md
EXTRACTOR_INVENTORY.md
INTEGRATION_PLAN.md (如果偏指南)
VALIDATION_GUIDE.md
VALIDATION_METHODS.md
2. 提取器 → extractors/
current/fusion/ (2个 - 保留)
extractor_fusion_complete.py # ✅ 当前主用
extractor_fusion_v1.py # ✅ 备份
current/llm/ (3个 - 保留)
llm_extractor_dashscope.py # ✅ 当前主用
llm_relation_extractor.py # ✅ 关系提取
universal_extractor_v2.py # ✅ 通用版
archive/ (20个 - 归档)
# SUC5系列 (6个)
extractor_suc5.py
extractor_suc5_v2.py
extractor_suc5_v3.py
extractor_suc5_v4.py
extractor_suc5_final.py
extractor_suc5_pc_match.py
# PC实验版 (8个)
extractor_pc_122_types.py
extractor_pc_based.py
extractor_pc_complete.py
extractor_pc_complete_types.py
extractor_pc_entities.py
extractor_pc_entities_v2.py
extractor_pc_full_types.py
extractor_pc_style.py
extractor_pc_v2.py
# 其他旧版 (6个)
extractor_complete_v1.py
extractor_enhanced.py
extractor_final.py
extractor_hybrid.py
extractor_hybrid_v3.py
extractor_llm_v1.py
extractor_production_v1.py
extractor_v2_pro.py
universal_extractor_v1.py
3. Shell脚本 → scripts/shell/
archive_old_versions.sh
run_layer1_evaluation.sh
RUN_V2_EXTRACTION.sh
setup_docker_mirror.sh
start_api.sh
stop_api.sh
4. 测试文件 → tests/
test_api.py
test_improved_quick.py
test_litchi_v12.py
test_llm_extraction.py
test_phylo_result.json
test_rag_prompt_v2.py
test_rag_prompt_v2_real.py
test_sentence_extraction.py
test_v12_1_final.py
test_v12_1_fixed_v2.py
test_v12_1_full.py
test_v12_1_lite.py
test_v12_1_quality_report.md
test_v12_1_quick.py
test_v12_1_step_by_step.py
test_v2_core.py
5. 规则库 → data/rule_bases/
rule_base_complete.py
rule_base_full.json
rule_base_loader.py
rule_base_priority.json
6. 配置文件 → config/
config.py (如果存在)
nginx.conf
prometheus.yml
pyproject.toml
poetry.lock
📋 根目录保留文件
整理后根目录只保留:
README.md # 项目说明
LICENSE # 许可证 (如果不存在需创建)
.gitignore # Git忽略
requirements.txt # Python依赖
requirements-rag.txt # RAG依赖
# 核心提取器 (软链接或保留)
extractor_fusion_complete.py # 主提取器
# 核心文档 (软链接)
EXTRACTOR_CATALOG.md -> docs/guides/EXTRACTOR_CATALOG.md
# 目录
docs/
extractors/
scripts/
tests/
config/
data/
src/
archive/ (如果保留)
paper/
output/
supplementary_files/
🔧 执行命令
# 1. 创建目录结构
cd /home/xia-lab/gene-family-mas-v2
mkdir -p docs/{changelogs,reports,plans,analysis,guides}
mkdir -p extractors/{current/{fusion,llm},archive}
mkdir -p scripts/shell
mkdir -p config
mkdir -p data/rule_bases
# 2. 移动文档
mv CHANGELOG*.md docs/changelogs/
mv revision_log_0330.md docs/changelogs/
mv *_REPORT.md docs/reports/
mv *_PLAN.md docs/plans/
mv *_ANALYSIS.md docs/analysis/
mv EXTRACTOR_*.md docs/guides/
# 3. 移动提取器
mv extractor_fusion*.py extractors/current/fusion/
mv llm_extractor*.py llm_relation_extractor.py universal_extractor_v2.py extractors/current/llm/
mv extractor_suc5*.py extractor_pc_*.py extractor_complete_v1.py extractor_enhanced.py extractor_final.py extractor_hybrid*.py extractor_llm_v1.py extractor_production_v1.py extractor_v2_pro.py universal_extractor_v1.py extractors/archive/
# 4. 移动脚本
mv *.sh scripts/shell/
# 5. 移动测试文件
mv test_*.py tests/
mv test_*.json tests/
mv test_*.md tests/
# 6. 移动规则库
mv rule_base*.py rule_base*.json data/rule_bases/
# 7. 移动配置
mv nginx.conf prometheus.yml pyproject.toml poetry.lock config/
# 8. 创建根目录核心文件软链接
ln -s extractors/current/fusion/extractor_fusion_complete.py extractor.py
ln -s docs/guides/EXTRACTOR_CATALOG.md EXTRACTOR_CATALOG.md
⚠️ 注意事项
- 先备份:执行前确保有git提交或备份
- 检查引用:移动后检查其他文件中的import路径
- 软链接:根目录保留软链接方便访问
- archive目录:如果已存在archive_old_versions,考虑合并
整理方案创建时间:2026-04-12