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

Function categorize_paper

deployments/feishu/daily-push-agent/main.py:1533–1545  ·  view source on GitHub ↗

Backward-compatible coarse categorization.

(score: float, paper: Dict, profile: Dict, weights: Dict)

Source from the content-addressed store, hash-verified

1531
1532
1533def categorize_paper(score: float, paper: Dict, profile: Dict, weights: Dict) -> str:
1534 """Backward-compatible coarse categorization."""
1535 threshold_high = weights.get("threshold_high_relevant", 0.75)
1536 threshold_maybe = weights.get("threshold_maybe_interested", 0.50)
1537 threshold_edge = weights.get("threshold_edge_relevant", 0.15)
1538
1539 if is_must_read(paper, profile) and score >= threshold_edge:
1540 return "must_read"
1541 if score >= threshold_high:
1542 return "high_relevant"
1543 if score >= threshold_maybe:
1544 return "maybe_interested"
1545 return "edge_relevant"
1546
1547
1548def apply_push_count_limit(scored_papers: List[PaperWithScore], weights: Dict) -> List[PaperWithScore]:

Callers 1

sort_and_categorizeFunction · 0.85

Calls 2

is_must_readFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected