Z12887

{
    "Z1K1": "Z2",
    "Z2K1": {
        "Z1K1": "Z6",
        "Z6K1": "Z12887"
    },
    "Z2K2": {
        "Z1K1": "Z14",
        "Z14K1": "Z12884",
        "Z14K3": {
            "Z1K1": "Z16",
            "Z16K1": "Z610",
            "Z16K2": "def Z12884(Z12884K1):\n\timport re\n\timport unicodedata\n\n\t# These hexadecimal values are based on Unicode specification\n\tvowel_range = [chr(char_pos) for char_pos in range(0x1b83, 0x1b89+1)]\n\tconsonant_range = [chr(char_pos) for char_pos in range(0x1b8a, 0x1ba0+1)] + [chr(char_pos) for char_pos in range(0x1bae, 0x1baf+1)]\n\tnumber_range = [chr(char_pos) for char_pos in range(0x1bb0, 0x1bb9+1)]\n\tvowel_signs = {\"\\u1ba4\": \"i\", \"\\u1ba5\": \"u\", \"\\u1ba6\": \"é\", \"\\u1ba7\": \"o\", \"\\u1ba8\": \"e\", \"\\u1ba9\": \"eu\", \"\\u1baa\": \"\", \"\\u1bab\": \"\"}\n\tfinal_consonants = {\"\\u1b80\": \"ng\", \"\\u1b81\": \"r\", \"\\u1b82\": \"h\"}\n\tinsert_consonants = {\"\\u1ba1\": \"y\", \"\\u1ba2\": \"r\", \"\\u1ba3\": \"l\"}\n\t\n\t# The method is to remove every valid Sundanese script unit until only the invalid ones (if there's any) remain\n\tremain = Z12884K1\n\n\tconsonant_base_pattern = re.compile(f\"[{*.join(consonant_range)}][{*.join(insert_consonants.keys())}]?[{*.join(vowel_signs.keys())}]?[{*.join(final_consonants.keys())}]?\", re.UNICODE)\n\tvowel_base_pattern = re.compile(f\"[{*.join(vowel_range)}][{*.join(final_consonants.keys())}]?\", re.UNICODE)\n\tvalid_letters = re.findall(consonant_base_pattern, remain) + re.findall(vowel_base_pattern, remain)\n\tvalid_letters.sort(reverse = True, key = len)\n\tfor unit in valid_letters:\n\t\tremain = remain.replace(unit, \"\")\n\n\tif (any(vowel_sign for vowel_sign in vowel_signs.keys() if vowel_sign in remain)\n\t\tor any(final_consonant for final_consonant in final_consonants.keys() if final_consonant in remain)\n\t\tor any(insert_consonant for insert_consonant in insert_consonants.keys() if insert_consonant in remain)):\n\t\treturn False\n\n\tnumber_pattern = re.compile(f\"\\|[{''.join(number_range)}]+\\|\", re.UNICODE)\n\tvalid_numbers = re.findall(number_pattern, remain)\n\tfor unit in valid_numbers:\n\t\tremain = remain.replace(unit, \"\")\n\n\tif (any(number for number in number_range if number in remain)):\n\t\treturn False\n\n\t# If no (invalid) Sundanese script remain, the script in the input is valid\n\treturn True"
        }
    },
    "Z2K3": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11",
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1078",
                "Z11K2": "cek validitas aksara Sunda, Python"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "is Sundanese script valid, Python language"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1430",
                "Z11K2": "prüfe Sudanesische Schrift in Python"
            }
        ]
    },
    "Z2K4": {
        "Z1K1": "Z32",
        "Z32K1": [
            "Z31"
        ]
    },
    "Z2K5": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11",
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1078",
                "Z11K2": "implementasi bahasa Python untuk fungsi pemeriksa apakah aksara Sunda yang dikandung dalam teks valid"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "Python implementation for the Sundanese script validation function"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1430",
                "Z11K2": "Python-Implementierung der Funktion zur Prüfung von Sudanesischer Schrift"
            }
        ]
    }
}