MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / normalize_direct_pdf_title_hint

Function normalize_direct_pdf_title_hint

agents/master-coordinator/main.py:1118–1139  ·  view source on GitHub ↗

Keep only meaningful custom title hints for direct PDF-link reading.

(text: Any)

Source from the content-addressed store, hash-verified

1116
1117
1118def 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
1142def strip_google_scholar_url(text: Any) -> str:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected