(text: str)
| 1439 | |
| 1440 | |
| 1441 | def method_section_requires_mechanism_flow(text: str) -> bool: |
| 1442 | body = section_body(text, "方法主线") |
| 1443 | if not body: |
| 1444 | return False |
| 1445 | lower = body.lower() |
| 1446 | keyword_hits = sum(1 for token in METHOD_PAPER_SIGNAL_KEYWORDS if token.lower() in lower) |
| 1447 | has_formula = "$$" in body or bool(re.search(r"\$[^$\n]{4,}\$", body)) |
| 1448 | return has_formula or keyword_hits >= 2 |
| 1449 | |
| 1450 | |
| 1451 | def mechanism_flow_warnings(text: str) -> list[str]: |
no test coverage detected