Detect Armenian script (mixed_unicode.py)
This commit is contained in:
parent
b19ce0be2f
commit
e54db0858c
1 changed files with 3 additions and 0 deletions
|
@ -6,6 +6,7 @@ class Script(enum.Enum):
|
||||||
Latin = 1
|
Latin = 1
|
||||||
Cyrillic = 2
|
Cyrillic = 2
|
||||||
Greek = 3
|
Greek = 3
|
||||||
|
Armenian = 4
|
||||||
WORD_SEPERATORS = [",", " ", "\t", "."]
|
WORD_SEPERATORS = [",", " ", "\t", "."]
|
||||||
|
|
||||||
class Module(ModuleManager.BaseModule):
|
class Module(ModuleManager.BaseModule):
|
||||||
|
@ -17,6 +18,8 @@ class Module(ModuleManager.BaseModule):
|
||||||
return Script.Greek
|
return Script.Greek
|
||||||
elif 1024 <= point <= 1327:
|
elif 1024 <= point <= 1327:
|
||||||
return Script.Cyrillic
|
return Script.Cyrillic
|
||||||
|
elif 1329 <= point <= 1418:
|
||||||
|
return Script.Armenian
|
||||||
return Script.Unknown
|
return Script.Unknown
|
||||||
|
|
||||||
@utils.hook("received.message.channel")
|
@utils.hook("received.message.channel")
|
||||||
|
|
Loading…
Reference in a new issue