fix 私->我

This commit is contained in:
Tan, Kian-ting 2021-08-14 21:42:26 +08:00
parent 5a12599eb9
commit 3eb0440b58
2 changed files with 4 additions and 3 deletions

View file

@ -7,7 +7,7 @@ This tool will automatically generate fake Chinese from Japanese sentences.
Using MeCab to parse and word-tag Japanese sentences instead of COTOHA API.
## Demo
私は本日定時退社します -> 我本日定時退社
私は本日定時退社します -> 我本日定時退社
私はお酒を飲みたい -> 我御酒飲欲

View file

@ -69,8 +69,6 @@ if __name__ == "__main__":
prime = token["lemma"]
if token['lemma'] == '私-代名詞':
prime = ''
if (token['lemma'] == '' or token['lemma'] == '貴方' or token['lemma'] == 'お前'):
prime = ''
@ -83,6 +81,9 @@ if __name__ == "__main__":
if compound_matched:
prime = compound_matched.group(1)
if token['lemma'] == '私-代名詞':
prime = ''
if len(token["features"]) != 0:
if "連体形-一般" in token['features']:
if token['lemma'] == 'ない':