fix 私->我
This commit is contained in:
parent
5a12599eb9
commit
3eb0440b58
2 changed files with 4 additions and 3 deletions
|
@ -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.
|
Using MeCab to parse and word-tag Japanese sentences instead of COTOHA API.
|
||||||
|
|
||||||
## Demo
|
## Demo
|
||||||
私は本日定時退社します -> 我本日定時退社為
|
私は本日定時退社します -> 我本日定時退社
|
||||||
|
|
||||||
私はお酒を飲みたい -> 我御酒飲欲
|
私はお酒を飲みたい -> 我御酒飲欲
|
||||||
|
|
||||||
|
|
|
@ -69,8 +69,6 @@ if __name__ == "__main__":
|
||||||
prime = token["lemma"]
|
prime = token["lemma"]
|
||||||
|
|
||||||
|
|
||||||
if token['lemma'] == '私-代名詞':
|
|
||||||
prime = '我'
|
|
||||||
|
|
||||||
if (token['lemma'] == '君' or token['lemma'] == '貴方' or token['lemma'] == 'お前'):
|
if (token['lemma'] == '君' or token['lemma'] == '貴方' or token['lemma'] == 'お前'):
|
||||||
prime = '你'
|
prime = '你'
|
||||||
|
@ -83,6 +81,9 @@ if __name__ == "__main__":
|
||||||
if compound_matched:
|
if compound_matched:
|
||||||
prime = compound_matched.group(1)
|
prime = compound_matched.group(1)
|
||||||
|
|
||||||
|
if token['lemma'] == '私-代名詞':
|
||||||
|
prime = '我'
|
||||||
|
|
||||||
if len(token["features"]) != 0:
|
if len(token["features"]) != 0:
|
||||||
if "連体形-一般" in token['features']:
|
if "連体形-一般" in token['features']:
|
||||||
if token['lemma'] == 'ない':
|
if token['lemma'] == 'ない':
|
||||||
|
|
Loading…
Reference in a new issue