-
Notifications
You must be signed in to change notification settings - Fork 1k
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
请问新版的 ltp-4.2.13 是不是取消了句子切分的功能? #667
Comments
from ltp import LTP, StnSplit |
相同的问题: work_listing = StnSplit().split(works) 其中 |
请问,是不是4.2之后的没有seg这个函数了啊 |
好像是这样的 |
收到,谢谢! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我运行如下程序:
from ltp import LTP
path = r"small"
txt = "小明吃苹果。小明打篮球。"
ltp = LTP(path)
output = ltp.pipeline(txt, tasks=["cws", "pos"])
print(output.cws)
print(output.pos)
得到了如下结果:
['小明', '吃', '苹果', '。', '小明', '打', '篮球', '。']
['nh', 'v', 'n', 'wp', 'nh', 'v', 'n', 'wp']
发现它没有断句,就尝试了如下措施,结果都报错了:
sents = ltp.sentsplit(txt) # 试图断句报错
sents = ltp.sent_split(txt) # 试图断句报错
sents = ltp.splitsent(txt) # 试图断句报错
sents = ltp.split_sent(txt) # 试图断句报错
请问ltp的正确的断句方法是什么?
The text was updated successfully, but these errors were encountered: