liuhuanyong / TextGrapher

Text Content Grapher based on keyinfo extraction by NLP method。输入一篇文档,将文档进行关键信息提取,进行结构化,并最终组织成图谱组织形式,形成对文章语义信息的图谱化展示。
1.37k stars 360 forks source link

pycharm运行错误 #21

Open yellowmamba824 opened 2 years ago

yellowmamba824 commented 2 years ago

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 commented 1 year ago

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

yellowmamba824 commented 1 year ago

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

solike commented 1 year ago

报错都提示你怎么用了呀

BeyondHeaven commented 1 year ago

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

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

chenqianqian-k commented 3 weeks ago

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

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

你好,我修改后也遇到一样的问题,可以方便告知你是如何解决的吗,万分感谢