diff --git a/README.md b/README.md index 0874d1e..091aa53 100644 --- a/README.md +++ b/README.md @@ -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 -私は本日定時退社します -> 我本日定時退社為 +私は本日定時退社します -> 我本日定時退社 私はお酒を飲みたい -> 我御酒飲欲 diff --git a/pseudo-chinese.py b/pseudo-chinese.py index 35415e2..3146cb0 100644 --- a/pseudo-chinese.py +++ b/pseudo-chinese.py @@ -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'] == 'ない':