code: def udom83(text: str) -> str:
      
  
      if not text or not isinstance(text, str):
          return ""
  
      text = _RE_1.sub("ัน\\1", text)
      text = _RE_2.sub("ั\\1", text)
      text = _RE_3.sub("ัน\\1", text)
      text = _RE_4.sub("ัน", text)
      text = _RE_5.sub("\\1", text)
      text = _RE_6.sub("\\1ย", text)
      text = _RE_7.sub("ม\\1", text)
      text = _RE_8.sub("ม", text)
      text = _RE_9.sub("ม", text)
      text = _RE_10.sub("", text)
      text = _RE_11.sub("", text)
  
      if not text:
          return ""
  
      sd = text[0].translate(_TRANS1)
      sd += text[1:].translate(_TRANS2)
  
      return (sd + "000000")[:7]
docs: Udom83 - It's a Thai soundex rule.
  
      :param str text: Thai word
      :return: Udom83 soundex