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

pycharm运行错误 #21

Open
yellowmamba824 opened this issue Sep 22, 2022 · 4 comments
Open

pycharm运行错误 #21

yellowmamba824 opened this issue Sep 22, 2022 · 4 comments

Comments

@yellowmamba824
Copy link

TypeError: init(): incompatible constructor arguments. The following argument types are supported:
1. pyltp.Segmentor(model_path: str, lexicon_path: str = None, force_lexicon_path: str = None)

@Yuning-J
Copy link

Yuning-J commented Dec 3, 2022

我也遇到了一样的问题!请问您解决了吗?

@yellowmamba824
Copy link
Author

这条报错就是告诉了你segmentor怎么用,按照上面的用法用就行了,不需要先创建实体,再load

@solike
Copy link

solike commented Feb 10, 2023

报错都提示你怎么用了呀

@BeyondHeaven
Copy link

这条报错就是告诉了你segmentor怎么用,按照上面的用法用就行了,不需要先创建实体,再load

self.segmentor = Segmentor(model_path="./ltp_data/cws.model", lexicon_path= None, force_lexicon_path = None)
我试了这样也不行

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

4 participants