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

Function dedupe_preserve_order

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

Keep the first occurrence of each non-empty string.

(items: List[str])

Source from the content-addressed store, hash-verified

524
525
526def dedupe_preserve_order(items: List[str]) -> List[str]:
527 """Keep the first occurrence of each non-empty string."""
528 seen = set()
529 result = []
530 for item in items:
531 normalized = str(item or "").strip()
532 if not normalized or normalized in seen:
533 continue
534 seen.add(normalized)
535 result.append(normalized)
536 return result
537
538
539def estimate_quality_score(paper: Dict) -> float:

Callers 4

load_default_conferencesFunction · 0.85
load_default_journalsFunction · 0.85
prepare_paper_featuresFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected