Z31727

{
    "Z1K1": "Z2",
    "Z2K1": {
        "Z1K1": "Z6",
        "Z6K1": "Z31727"
    },
    "Z2K2": {
        "Z1K1": "Z14",
        "Z14K1": "Z31670",
        "Z14K3": {
            "Z1K1": "Z16",
            "Z16K1": "Z610",
            "Z16K2": "def Z31670(Z31670K1):\n    import re\n    jawi = Z31670K1\n    jawiRules = {\n        \"digraf\": {\n            \"ng\": 'ڠ',\n            \"ny\": 'ڽ',\n            \"sy\": 'ش',\n            \"kh\": 'خ',\n            \"gh\": 'غ',\n        },\n        \"huruf\": {\n            \"a\": 'ا',\n            \"b\": 'ب',\n            \"c\": 'چ',\n            \"d\": 'د',\n            \"e\": 'ي',\n            \"f\": 'ف',\n            \"g\": 'ݢ',\n            \"h\": 'ه',\n            \"i\": 'ي',\n            \"j\": 'ج',\n            \"k\": 'ك',\n            \"l\": 'ل',\n            \"m\": 'م',\n            \"n\": 'ن',\n            \"o\": 'و',\n            \"p\": 'ڤ',\n            \"q\": 'ق',\n            \"r\": 'ر',\n            \"s\": 'س',\n            \"t\": 'ت',\n            \"u\": 'و',\n            \"v\": 'ۏ',\n            \"w\": 'و',\n            \"x\": 'کس',\n            \"y\": 'ي',\n            \"z\": 'ز',\n        },\n        \"tanda\": {\n            ',': '،',\n            ';': '؛',\n            '\\\\?': '؟',\n            '\\\\!': '!',\n        },\n        \"pola\": [\n# K = Konsonan, V = Vokal. Test at regexr.com\n            {\n                \"description\": \"\"\"\n                KaK, KV.KaK, KV.KV.KaK, etc\n                Removes the a in suku kata tertutup\n                \"\"\",\n                \"pattern\": r\"\\b((?:(?:[b-df-hj-np-tv-z]|kh|gh|ny|ng|sy)[aeiou])*)([b-df-hj-np-tv-z]|kh|gh|ny|ng|sy)a([b-df-hj-np-tv-z]|kh|gh|ny|ng|sy)\\b\",\n                \"replacement\": r\"\\1\\2\\3\",\n            }\n        ],\n        \"exceptions\": {\n            \"muhammad\": 'محمد',\n            \"ahmad\": 'أحمد',\n            \"ali\": 'علي',\n            \"fatimah\": 'فاطمة',\n            \"johor\": 'جوهر',\n            \"melaka\": 'ملاک',\n            \"allah\": 'الله',\n            \"quran\": 'قرءان',\n            \"nabi\": 'نبي',\n        }\n    }\n    for key in jawiRules[\"exceptions\"]:\n        initialResult = re.sub(key, jawiRules[\"exceptions\"][key], jawi, flags=re.I)\n        if initialResult != None:\n            jawi = initialResult\n    for key in jawiRules[\"pola\"]:\n        initialResult = re.sub(key[\"pattern\"], key[\"replacement\"], jawi, flags=re.I)\n        if initialResult != None:\n            jawi = initialResult\n    for key in jawiRules[\"digraf\"]:\n        initialResult = re.sub(key, jawiRules[\"digraf\"][key], jawi, flags=re.I)\n        if initialResult != None:\n            jawi = initialResult\n    for key in jawiRules[\"huruf\"]:\n        initialResult = re.sub(key, jawiRules[\"huruf\"][key], jawi, flags=re.I)\n        if initialResult != None:\n            jawi = initialResult\n    for key in jawiRules[\"tanda\"]:\n        initialResult = re.sub(key, jawiRules[\"tanda\"][key], jawi, flags=re.I)\n        if initialResult != None:\n            jawi = initialResult\n    return jawi"
        }
    },
    "Z2K3": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11",
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "Rumi to Jawi (Python)"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1531",
                "Z11K2": "Rumi ke Jawi (Python)"
            }
        ]
    },
    "Z2K4": {
        "Z1K1": "Z32",
        "Z32K1": [
            "Z31"
        ]
    },
    "Z2K5": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11"
        ]
    }
}