def normalize(text: str) -> str:
    """
    Thai text normalize

    :param str text: thai text
    :return: thai text
    **Example**::
     >>> print(normalize("เเปลก")=="แปลก") # เ เ ป ล ก กับ แปลก
     True
    """
    for data in _NORMALIZE_RULE2:
        text = re.sub(data[0].replace("t", "[่้๊๋]"), data[1], text)
    for data in list(zip(_NORMALIZE_RULE1, _NORMALIZE_RULE1)):
        text = re.sub(data[0].replace("t", "[่้๊๋]") + "+", data[1], text)
    return text
def normalize ( text : str ) -> str : for data in _NORMALIZE_RULE2 : text = re . sub ( data [ 0 ] . replace ( "t" , "[่้๊๋]" ) , data [ 1 ] , text ) for data in list ( zip ( _NORMALIZE_RULE1 , _NORMALIZE_RULE1 ) ) : text = re . sub ( data [ 0 ] . replace ( "t" , "[่้๊๋]" ) + "+" , data [ 1 ] , text ) return text
Thai text normalize

    :param str text: thai text
    :return: thai text
    **Example**::
     >>> print(normalize("เเปลก")=="แปลก") # เ เ ป ล ก กับ แปลก
     True