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

Function _term_matches_daily_note_section

agents/reading-agent/main.py:2350–2358  ·  view source on GitHub ↗
(term: str, section_text: str)

Source from the content-addressed store, hash-verified

2348
2349def _term_matches_daily_note_section(term: str, section_text: str) -> bool:
2350 normalized_term = _clean_text(term).replace("_", " ").replace("-", " ").lower()
2351 normalized_section = _clean_text(section_text).replace("_", " ").replace("-", " ").lower()
2352 if not normalized_term or not normalized_section:
2353 return False
2354 if normalized_term in normalized_section:
2355 return True
2356 tokens = [token for token in re.split(r"[^0-9a-zA-Z\u4e00-\u9fff]+", normalized_term) if len(token) >= 3]
2357 return bool(tokens) and all(token in normalized_section for token in tokens)
2358
2359
2360def _daily_note_topic_methods(section_body: str, user_profile: Optional[Dict[str, Any]]) -> List[str]:
2361 section_text = re.sub(r"\s+", " ", section_body)

Callers 1

Calls 1

_clean_textFunction · 0.70

Tested by

no test coverage detected