fix: K-Josa module fix
This commit is contained in:
parent
434198b80d
commit
1e285b4c78
1 changed files with 2 additions and 2 deletions
|
@ -9,12 +9,12 @@ class KJosa(ModuleInterface):
|
||||||
|
|
||||||
self.funcs["process_josa"] = self._process
|
self.funcs["process_josa"] = self._process
|
||||||
print("[K-Josa] Korean postposition processor, K-Josa V1 loaded.")
|
print("[K-Josa] Korean postposition processor, K-Josa V1 loaded.")
|
||||||
|
|
||||||
async def execute_module(self, ctx: Note):
|
async def execute_module(self, ctx: Note):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def _process(self, w, t, f):
|
def _process(self, w, t, f):
|
||||||
return (w + ((t if (ord(w[-1])- 44032 % 28 == 0) else f ) if (44032 <= ord(w[-1]) <= 55203) else f"{t}({f})")) if t and f else w
|
return (w + ((t if ((ord(w[-1])- 44032) % 28 != 0) else f ) if (44032 <= ord(w[-1]) <= 55203) else f"{t}({f})")) if (t and f) else w
|
||||||
|
|
||||||
def module_ready(self):
|
def module_ready(self):
|
||||||
print("[K-josa] Module Ready.")
|
print("[K-josa] Module Ready.")
|
||||||
|
|
Loading…
Reference in a new issue