HIT-SCIR / ltp

Language Technology Platform
http://ltp.ai
4.96k stars 1.04k forks source link

StnSplit().split()方法在dep等任务中报错 #703

Open drjiangyang opened 5 months ago

drjiangyang commented 5 months ago

以下代码运行报错:TypeError: argument 'stn_length': 'float' object cannot be interpreted as an integer

raw = open(file_name, encoding = 'utf-8').read()            
sents = StnSplit().split(raw)
for sent in sents:
    result = ltp.pipeline([sent], tasks = ["cws", "pos", "dep"])

但是,如果tasks中只保留“cws”和"pos",则运行正常。

AlongWY commented 5 months ago

请给一些例子方便进行调试