Store mask-review excerpts and bind kinship from local phrase context.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
f7ffd28332
commit
a65ea98b0c
7 files changed
+116
-17
No files matched your search
@@ -17,6 +17,7 @@ os.environ["KANSHO_FAKE_DETECT"] = "1"
|
||||
|
||||
from fastapi.testclient import TestClient
|
||||
from detect_learning import (
|
||||
cue_for_mention,
|
||||
excerpt_view,
|
||||
get_cue_decision,
|
||||
get_detect_operating_mode,
|
||||
@@ -270,6 +271,14 @@ def main() -> None:
|
||||
prefix + homonym,
|
||||
)
|
||||
expect(mapped["highlight_start"] == second["highlight_start"], "rendered detect offsets map to the dish Sushi")
|
||||
expect(cue_for_mention(homonym, first_at, first_at + 5, "Sushi") == "frau", "person Sushi attaches to Frau")
|
||||
expect(cue_for_mention(homonym, second_at, second_at + 5, "Sushi") == "rohan", "dish Sushi stays distinct from Frau")
|
||||
appos = "Sushi, meine Frau war erkältet."
|
||||
appos_at = appos.index("Sushi")
|
||||
expect(cue_for_mention(appos, appos_at, appos_at + 5, "Sushi") == "frau", "apposition Sushi, meine Frau binds Frau")
|
||||
far = "Meine Frau und ich aßen Sushi."
|
||||
far_at = far.rindex("Sushi")
|
||||
expect(cue_for_mention(far, far_at, far_at + 5, "Sushi") != "frau", "Frau elsewhere in the sentence does not bind the dish")
|
||||
|
||||
sushi_review = sushi.json().get("pending_mask_review") or {}
|
||||
sushi_decisions = []
|
||||
|
||||
Reference in new issue
Block a user