解析 PDF
(pdf_path: str)
| 625 | |
| 626 | |
| 627 | def parse_pdf(pdf_path: str) -> Dict: |
| 628 | """解析 PDF""" |
| 629 | text = extract_text_from_pdf(pdf_path) |
| 630 | metadata = extract_metadata(text) |
| 631 | sections = extract_sections(text) |
| 632 | directions = infer_research_directions(text) |
| 633 | methodology_preferences = infer_methodology_preferences(text, sections) |
| 634 | inferred_topics = infer_topics(text, directions) |
| 635 | |
| 636 | return { |
| 637 | **metadata, |
| 638 | "sections": sections, |
| 639 | "inferred_directions": directions, |
| 640 | "methodology_preferences": methodology_preferences, |
| 641 | "inferred_topics": inferred_topics, |
| 642 | "full_text": text |
| 643 | } |
| 644 | |
| 645 | |
| 646 | def parse_paper_for_coldstart(pdf_path: str) -> Dict: |
no test coverage detected