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

Function dedupe_strings

experiments/baselines/citation_enhanced/runner.py:328–340  ·  view source on GitHub ↗
(values: Iterable[Any])

Source from the content-addressed store, hash-verified

326
327
328def dedupe_strings(values: Iterable[Any]) -> List[str]:
329 result: List[str] = []
330 seen: set[str] = set()
331 for value in values:
332 cleaned = str(value or "").strip()
333 if not cleaned:
334 continue
335 marker = cleaned.casefold()
336 if marker in seen:
337 continue
338 seen.add(marker)
339 result.append(cleaned)
340 return result
341
342
343def build_initial_profile(user_meta: Dict[str, Any], role: Dict[str, Any]) -> Dict[str, Any]:

Callers 1

build_initial_profileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected