Skip to content

Commit 4af2d66

Browse files
committed
Change the name of the layout from QWERTY to TIS_820_2538
1 parent 4831d1c commit 4af2d66

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pythainlp/util/keyboard.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@
103103
EN_TH_TRANSLATE_TABLE = str.maketrans(EN_TH_KEYB_PAIRS)
104104
TH_EN_TRANSLATE_TABLE = str.maketrans(TH_EN_KEYB_PAIRS)
105105

106-
TH_QWERTY = [
106+
TIS_820_2538 = [
107107
"-", "ๅ", "/", "_", "ภ", "ถ", "ุ", "ึ", "ค", "ต", "จ", "ข", "ช",
108108
"ๆ", "ไ", "ำ", "พ", "ะ", "ั", "ี", "ร", "น", "ย", "บ", "ล", "ฃ",
109109
"ฟ", "ห", "ก", "ด", "เ", "้", "่", "า", "ส", "ว", "ง",
110110
"ผ", "ป", "แ", "อ", "ิ", "ื", "ท", "ม", "ใ", "ฝ"
111111
]
112112

113-
TH_SHIFT_QWERTY = [
113+
TIS_820_2538_SHIFT = [
114114
"%", "+", "๑", "๒", "๓", "๔", "ู", "฿", "๕", "๖", "๗", "๘", "๙",
115115
"๐", "\"", "ฎ", "ฑ", "ธ", "ํ", "๊", "ณ", "ฯ", "ญ", "ฐ", ",", "ฅ",
116116
"ฤ", "ฆ", "ฏ", "โ", "ฌ", "็", "๋", "ษ", "ศ", "ซ", ".",
@@ -186,7 +186,7 @@ def thai_keyboard_dist(c1: str, c2: str, shift_dist: float = 0.0) -> float:
186186
thai_keyboard_dist("ฟ", "ฤ", 0.5)
187187
# output: 0.5
188188
"""
189-
def get_char_coord(ch: str, layouts=[TH_QWERTY, TH_SHIFT_QWERTY]):
189+
def get_char_coord(ch: str, layouts=[TIS_820_2538, TIS_820_2538_SHIFT]):
190190
for layout in layouts:
191191
for row in layout:
192192
if ch in row:

0 commit comments

Comments
 (0)