Keep only meaningful custom title hints for direct PDF-link reading.
(text: Any)
| 1116 | |
| 1117 | |
| 1118 | def normalize_direct_pdf_title_hint(text: Any) -> str: |
| 1119 | """Keep only meaningful custom title hints for direct PDF-link reading.""" |
| 1120 | candidate = str(text or "").strip() |
| 1121 | if not candidate: |
| 1122 | return "" |
| 1123 | normalized = candidate.casefold() |
| 1124 | generic_hints = { |
| 1125 | "paper", |
| 1126 | "pdf", |
| 1127 | "论文", |
| 1128 | "这篇", |
| 1129 | "这个", |
| 1130 | "这个pdf", |
| 1131 | "这篇论文", |
| 1132 | "帮我看看这个", |
| 1133 | "帮我读一下", |
| 1134 | "读一下", |
| 1135 | "看看这个", |
| 1136 | } |
| 1137 | if normalized in generic_hints or len(candidate) <= 4: |
| 1138 | return "" |
| 1139 | return candidate |
| 1140 | |
| 1141 | |
| 1142 | def strip_google_scholar_url(text: Any) -> str: |
no outgoing calls
no test coverage detected