Skip to content

Commit

Permalink
Renew Constant
Browse files Browse the repository at this point in the history
  • Loading branch information
KrakenAI committed Apr 1, 2017
1 parent a8b3d0d commit 639a018
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
35 changes: 19 additions & 16 deletions constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

# Spacebar
SPACEBAR = " "
SPACEBAR_TAG = "SPB"

# Escape Character
ESCAPE_WORD_DELIMITER = "\t"
Expand Down Expand Up @@ -64,7 +63,10 @@
"\u0e24", # ฤ
"\u0e30", # ะ
"\u0e31", # อั (ไม้หันอากาศ)
"\u0e32", # อา
[
"\u0e32", # อา
"\u0e45", # ๅ
],
"\u0e33", # อำ
"\u0e34", # อิ
"\u0e35", # อี
Expand All @@ -77,7 +79,6 @@
"\u0e42", # โ
"\u0e43", # ใ
"\u0e44", # ไ
"\u0e45", # ๅ
"\u0e47", # อ็

# Thai Tone
Expand All @@ -86,23 +87,25 @@
"\u0e4A", # อ๊
"\u0e4B", # อ๋

# Thai Number
"\u0e50", # ๐
"\u0e51", # ๑
"\u0e52", # ๒
"\u0e53", # ๓
"\u0e54", # ๔
"\u0e55", # ๕
"\u0e56", # ๖
"\u0e57", # ๗
"\u0e58", # ๘
"\u0e59", # ๙

# Thai Symbol
"\u0e2F", # ฯ
"\u0e46", # ๆ
"\u0e4C", # อ์ (การันต์)

# Thai Number
[
"\u0e50", # ๐
"\u0e51", # ๑
"\u0e52", # ๒
"\u0e53", # ๓
"\u0e54", # ๔
"\u0e55", # ๕
"\u0e56", # ๖
"\u0e57", # ๗
"\u0e58", # ๘
"\u0e59" # ๙
],

# Unused Thai Character
[
# Vowel
Expand Down Expand Up @@ -144,7 +147,7 @@
TAG_LIST = ["NN", "NR", "PPER", "PINT", "PDEM", "DPER", "DINT", "DDEM", "PDT",
"REFX", "VV", "VA", "AUX", "JJA", "JJV", "ADV", "NEG", "PAR", "CL",
"CD", "OD", "FXN", "FXG", "FXAV", "FXAJ", "COMP", "CNJ", "P", "IJ",
"PU", "FWN", "FWV", "FWA", "FWX", SPACEBAR_TAG]
"PU", "FWN", "FWV", "FWA", "FWX"]

NUM_TAGS = len(TAG_LIST) + 2

Expand Down
2 changes: 1 addition & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def get_token_list(self, index):
# Empty or Spacebar
if token == "" or token == constant.SPACEBAR:
word = constant.SPACEBAR
tag = constant.SPACEBAR_TAG
tag = constant.PAD_TAG_INDEX

# Word
else:
Expand Down

0 comments on commit 639a018

Please sign in to comment.