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

Function jaccard

experiments/baselines/knowledge_entity/runner.py:281–284  ·  view source on GitHub ↗
(left: set[str], right: set[str])

Source from the content-addressed store, hash-verified

279
280
281def jaccard(left: set[str], right: set[str]) -> float:
282 if not left or not right:
283 return 0.0
284 return len(left & right) / len(left | right)
285
286
287def dedupe_strings(values: Iterable[Any]) -> List[str]:

Callers 2

profile_entity_scoreFunction · 0.70
history_entity_scoreFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected