Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

「然後」被辨識為人名 🤔 #915

Closed
ljcucc opened this issue Apr 21, 2021 · 2 comments
Closed

「然後」被辨識為人名 🤔 #915

ljcucc opened this issue Apr 21, 2021 · 2 comments

Comments

@ljcucc
Copy link

ljcucc commented Apr 21, 2021

「我想要玩遊戲, 然後出去玩」的「然後」被jieba.posseg視為人名⋯⋯這中間是有什麼錯誤嗎?🤔🤔🤔

import jieba
import jieba.posseg as pseg

def testing():
    print("running testing of main")
    jieba.enable_paddle()
    seg_list = pseg.cut("我想要玩遊戲, 然後出去玩",use_paddle=True)
    for word, flag in seg_list:
        print(f"word: {word}, flag: {flag}",end=", \n")


if __name__ == "__main__":
    testing()

output:

$ pipenv run python ./main.py
running testing of main
Paddle enabled successfully......
word: 我, flag: r, 
word: 想要, flag: v, 
word: 玩, flag: v, 
word: 遊戲, flag: n, 
word: ,, flag: w, 
word:  然後, flag: nr, 
word: 出去玩, flag: v,

這裡的「然後」被標示為:word: 然後, flag: nr,

@returnWOW
Copy link

测试了一下,简体没问题,可能繁体支持不是很好

@ljcucc
Copy link
Author

ljcucc commented Apr 29, 2021

有了有了,我用OpenCC自動TC2SC就正常了!感謝🙏

@ljcucc ljcucc closed this as completed Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants