feat(corroboration): halacha matcher + cosine threshold (INV-COR3, X11)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 18:57:47 +00:00
parent 09eec6a906
commit dbc176ae66
4 changed files with 31 additions and 0 deletions

View File

@@ -15,3 +15,12 @@ def test_treatment_polarity():
assert cor.is_positive("followed") and cor.is_positive("explained")
assert cor.is_negative("distinguished") and cor.is_negative("overruled")
assert not cor.is_positive("mentioned") and not cor.is_negative("mentioned")
def test_match_accepts_above_threshold():
assert cor.accept_match(("h1", 0.62), floor=0.50) == "h1"
def test_match_rejects_below_threshold():
assert cor.accept_match(("h1", 0.41), floor=0.50) is None
def test_match_rejects_empty():
assert cor.accept_match(None, floor=0.50) is None