report-detect/archive/temp_scripts/verify_crt_extraction.py

38 lines
932 B
Python
Raw Normal View History

chore(project): conservative cleanup - archive temp scripts and old docs Major cleanup to improve project organization and maintainability. Changes: - Moved 34 temp/debug/test scripts to archive/temp_scripts/ - Moved 9 auxiliary tools to archive/tools/ - Moved 3 CRT test scripts to archive/crt_tests/ - Moved 4 OCR test scripts to archive/ocr_tests/ - Moved 14 old documentation files to archive/docs/ - Deleted 4 useless files (duplicates, temp files) Root directory: - Before: 67 files (cluttered) - After: 10 core files (clean and organized) Core files retained: - test_accuracy_batch_full.py (main script) - cma_extraction_template_primary.py (CMA extraction) - cma_extraction_final.py (backup CMA extraction) - CLAUDE.md (project guide) - TEST_ACCURACY_BATCH_README.md (usage guide) - TEST_ACCURACY_BATCH_DEPENDENCIES.md (dependency docs) - CLEANUP_PLAN.md (cleanup plan) - CLEANUP_SUMMARY.md (this file) - IMPLEMENTATION_SUMMARY.md (implementation summary) - requirements.txt (dependencies) Archive structure: archive/ ├── temp_scripts/ (34 files: test_, debug_, analyze_, etc.) ├── tools/ (9 files: find_, show_, visualize_, etc.) ├── crt_tests/ (3 files: CRT extraction tests) ├── ocr_tests/ (4 files: OCR timeout tests) └── docs/ (14 files: old reports and guides) Benefits: ✓ Cleaner root directory - easier navigation ✓ Better organization - clear separation of concerns ✓ Preserved history - all files archived, not deleted ✓ Improved maintainability - easier to find active files ✓ Better git history - removed 198 deleted files from tracking No functional changes - all core functionality preserved. Related: - TEST_ACCURACY_BATCH_DEPENDENCIES.md - dependency analysis - CLEANUP_PLAN.md - detailed cleanup plan Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 14:35:06 +08:00
"""
直接验证CRT提取 - 不使用multiprocessing
"""
from test_accuracy_batch_full import extract_institution_from_crt
import sys
test_pdfs = [
"src/test/resources/data/pdfs/YDQ23_001838.pdf",
"src/test/resources/data/pdfs/YDQ23_001850.pdf",
]
print("="*80)
print("直接验证CRT提取无multiprocessing")
print("="*80)
for pdf_path in test_pdfs:
print(f"\nTesting: {pdf_path}")
try:
# 直接调用不使用multiprocessing
result = extract_institution_from_crt(pdf_path)
print(f"Result: {result}")
if result:
print(f"SUCCESS! Found {len(result)} institution(s)")
for i, inst in enumerate(result, 1):
print(f" {i}. {inst}")
else:
print(f"FAILED! No institutions found")
except Exception as e:
print(f"ERROR: {e}")
import traceback
traceback.print_exc()
print("\n" + "="*80)