pyltp: the python extension for LTP
1.53k
stars
352
forks
source 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) #243
Closed
SuxinTong closed 1 year ago
class LtpParser: def init(self): LTP_DIR = "./ltp_data" self.segmentor = Segmentor() self.segmentor.load(os.path.join(LTP_DIR, "cws.model"))
...... ~\paper\EventTriplesExtraction-master\sentence_parser.py in init(self) 10 def init(self): 11 LTP_DIR = "./ltp_data" ---> 12 self.segmentor = Segmentor() 13 self.segmentor.load(os.path.join(LTP_DIR, "cws.model")) 14
TypeError: init(): incompatible constructor arguments. The following argument types are supported:
Invoked with: