Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
drjiangyang opened this issue Jun 9, 2024 · 1 comment
Open

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

drjiangyang opened this issue Jun 9, 2024 · 1 comment

Comments

@drjiangyang
Copy link

以下代码运行报错: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
Copy link
Contributor

AlongWY commented Jun 11, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants