Skip to content

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

@drjiangyang

Description

@drjiangyang

以下代码运行报错: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",则运行正常。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions