| 536 | |
| 537 | |
| 538 | def mechanical_translation_artifact_issues(text: str) -> list[dict[str, object]]: |
| 539 | issues: list[dict[str, object]] = [] |
| 540 | for idx, line in enumerate(text.splitlines(), start=1): |
| 541 | stripped = line.strip() |
| 542 | if not stripped: |
| 543 | continue |
| 544 | if stripped in {"---"} or re.search(r"https?://", stripped): |
| 545 | continue |
| 546 | match = MECHANICAL_TRANSLATION_ARTIFACT_RE.search(stripped) |
| 547 | if not match: |
| 548 | continue |
| 549 | issues.append( |
| 550 | { |
| 551 | "line_number": idx, |
| 552 | "line": stripped, |
| 553 | "artifact": match.group(0), |
| 554 | } |
| 555 | ) |
| 556 | return issues |
| 557 | |
| 558 | |
| 559 | def inspect_figure_callouts(text: str) -> list[str]: |