e6464dbbba5c3a5370f9a0cca436120b833d6e8a,pythainlp/util/thaiwordcheck.py,,,#,8

Before Change


_TH_TRUE_THAI_WORD = ["ฆ่า", "เฆี่ยน", "ศึก", "ศอก", "เศิก", "เศร้า", "ธ",
                      "ณ", "ฯพณฯ", "ใหญ่", "หญ้า", "ควาย", "ความ",
                      "กริ่งเกรง", "ผลิ"]  // คำไทยแท้
_TH_TRUE_FINALS = ["ก", "ด", "บ", "น", "ง", "ม", "ย", "ว"]  // ตัวสะกดตรงตามาตรา
_TH_NON_THAI_CHARS = ["ฆ", "ณ", "ฌ", "ฎ", "ฏ", "ฐ", "ฑ",
                      "ฒ", "ธ", "ศ", "ษ", "ฬ"]  // ตัวอักษรที่ไม่ใช่ไทยแท้
_TH_PREFIX_DIPHTHONG = ["กะ", "กระ", "ปะ", "ประ"]  // คำควบกล้ำขึ้นตัน

After Change


_TH_PREFIX_DIPHTHONG = {"กะ", "กระ", "ปะ", "ประ"}  // คำควบกล้ำขึ้นตัน
_THANTHAKHAT_CHAR = "\u0e4c"  // Thanthakhat (cancellation of sound)

_TH_CONSONANTS_PATTERN = re.compile(r"[ก-ฬฮ]", re.U)  // สำหรับตรวจสอบพยัญชนะ


def thaicheck(word: str) -> bool:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: PyThaiNLP/pythainlp
Commit Name: e6464dbbba5c3a5370f9a0cca436120b833d6e8a
Time: 2019-10-07
Author: arthit@gmail.com
File Name: pythainlp/util/thaiwordcheck.py
Class Name:
Method Name:


Project Name: OpenNMT/OpenNMT-tf
Commit Name: 13b6053473e11d5bbc7abd60ab607b3cf90598fa
Time: 2018-04-12
Author: guillaume.klein@systrangroup.com
File Name: docs/conf.py
Class Name:
Method Name:


Project Name: sobhe/hazm
Commit Name: 92ef803f985011888701f9893598fc087194af38
Time: 2017-08-15
Author: abolfazl.mahdizade@gmail.com
File Name: resources/WikiExtractor.py
Class Name:
Method Name: