(paper: Dict[str, Any], report_payload: Dict[str, Any])
| 1994 | |
| 1995 | def _daily_note_category(paper: Dict[str, Any], report_payload: Dict[str, Any]) -> str: |
| 1996 | values: List[str] = [] |
| 1997 | for key in ("title", "abstract", "summary", "venue", "source"): |
| 1998 | values.append(_clean_text(paper.get(key))) |
| 1999 | for value in paper.get("subjects") or paper.get("categories") or []: |
| 2000 | values.append(_clean_text(value)) |
| 2001 | for value in report_payload.get("keywords") or []: |
| 2002 | values.append(_clean_text(value)) |
| 2003 | text = " ".join(value for value in values if value).lower() |
| 2004 | |
| 2005 | def has_any(terms: Tuple[str, ...]) -> bool: |
| 2006 | return any(re.search(rf"(?<![a-z0-9]){re.escape(term)}(?![a-z0-9])", text) for term in terms) |
| 2007 | |
| 2008 | if has_any(("education", "classroom", "k-12", "school", "curriculum", "pedagogy")): |
| 2009 | return "AI for Education" |
| 2010 | if has_any(("protein", "molecular", "molecule", "biology", "bio", "chemistry", "materials science", "scientific discovery", "ai for science")): |
| 2011 | return "AI for Science" |
| 2012 | if has_any(("agent", "agents", "multi-agent", "tool", "orchestration")): |
| 2013 | return "AI Agents" |
| 2014 | if has_any(("vision", "image", "video", "3d", "segmentation")): |
| 2015 | return "Computer Vision" |
| 2016 | if has_any(("language", "llm", "nlp", "retrieval", "rag", "reasoning")): |
| 2017 | return "Language Models" |
| 2018 | if has_any(("reinforcement", "diffusion", "learning", "optimization", "distillation", "post-training", "on-policy")): |
| 2019 | return "Machine Learning" |
| 2020 | return "AI Research" |
| 2021 | |
| 2022 | |
| 2023 | def _daily_note_entry( |
| 2024 | *, |
no test coverage detected