def _is_thai_and_not_num(word: str) -> bool: for ch in word: if ch != "." and not isthaichar(ch) and not ch.isalpha: return False if ch in digits or ch in thai_digits: return False return True
def _is_thai_and_not_num(word: str) -> bool: for ch in word: if ch != "." and not isthaichar(ch): return False if ch in "๐๑๒๓๔๕๖๗๘๙0123456789": return False return True
def test_isthaichar(self): self.assertEqual(isthaichar("ก"), True) self.assertEqual(isthaichar("a"), False) self.assertEqual(isthaichar("0"), False)
def test_isthaichar(self): self.assertEqual(isthaichar("ก"), True) self.assertEqual(isthaichar("a"), False) self.assertEqual(isthaichar("0"), False)