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

3.2.1 使用ltp分词示例错误 #18

Open
todochenxi opened this issue Feb 26, 2023 · 1 comment
Open

3.2.1 使用ltp分词示例错误 #18

todochenxi opened this issue Feb 26, 2023 · 1 comment

Comments

@todochenxi
Copy link

todochenxi commented Feb 26, 2023

from lip import LTP
ltp = LTP()
# segment, hidden = ltp.seg(['南京市长江大桥。']) 报错
# 修改为
segment = ltp.pipeline(['南京市长江大桥。'], tasks=['cws'], return_dict=False)
print(segment)
@Anthoney
Copy link

Anthoney commented May 29, 2024

seg的用法在4.1.5及之前,后续的ltp的版本更新,需要用pipeline
pip install ltp==4.1.5

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