38 lines
932 B
Python
38 lines
932 B
Python
|
|
"""
|
|||
|
|
直接验证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)
|