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

Function _classify_homepage_section

agents/coldstart-agent/main.py:1060–1097  ·  view source on GitHub ↗
(line: str)

Source from the content-addressed store, hash-verified

1058
1059
1060def _classify_homepage_section(line: str) -> str:
1061 lowered = line.casefold().strip(" :-|")
1062 section_hints = {
1063 "research_interests": (
1064 "research interests",
1065 "interests",
1066 "research focus",
1067 "research topics",
1068 "研究兴趣",
1069 ),
1070 "research": (
1071 "research areas",
1072 "research area",
1073 "research",
1074 "selected research",
1075 "研究方向",
1076 "研究领域",
1077 ),
1078 "about": (
1079 "about",
1080 "bio",
1081 "biography",
1082 "about me",
1083 "个人简介",
1084 "简介",
1085 ),
1086 "projects": (
1087 "projects",
1088 "selected projects",
1089 "project",
1090 "代表项目",
1091 "项目",
1092 ),
1093 }
1094 for section_name, hints in section_hints.items():
1095 if any(lowered == hint or lowered.startswith(f"{hint}:") for hint in hints):
1096 return section_name
1097 return ""
1098
1099
1100def _extract_homepage_sections(html_text: str) -> Dict[str, Any]:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected