TextGrapher icon indicating copy to clipboard operation
TextGrapher copied to clipboard

pycharm运行错误

Open yellowmamba824 opened this issue 2 years ago • 4 comments

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)

yellowmamba824 avatar Sep 22 '22 07:09 yellowmamba824

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

Yuning-J avatar Dec 03 '22 06:12 Yuning-J

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

yellowmamba824 avatar Dec 03 '22 07:12 yellowmamba824

报错都提示你怎么用了呀

solike avatar Feb 10 '23 06:02 solike

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

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

BeyondHeaven avatar Mar 25 '23 14:03 BeyondHeaven