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

第三章 sent_split函数 问题 #21

Open
ji90po opened this issue Sep 8, 2023 · 0 comments
Open

第三章 sent_split函数 问题 #21

ji90po opened this issue Sep 8, 2023 · 0 comments

Comments

@ji90po
Copy link

ji90po commented Sep 8, 2023

from ltp import StnSplit
from ltp import LTP

ltp = LTP()

sents2 = StnSplit().batch_split(["南京市长江大桥。", "汤姆生病了。他去了医院。"])
sents2

['南京市长江大桥。', '汤姆生病了。', '他去了医院。']

segment = ltp.pipeline(sents2,tasks=['cws'], return_dict=False)
segment

([['南京市', '长江', '大桥', '。'],
['汤姆', '生病', '了', '。'],
['他', '去', '了', '医院', '。']],)

segment = ltp.pipeline(sents2)
segment['pos']

[['ns', 'ns', 'n', 'wp'], ['nh', 'v', 'u', 'wp'], ['r', 'v', 'u', 'n', 'wp']]

@ji90po ji90po changed the title 第二章 sent_split函数 问题 第三章 sent_split函数 问题 Sep 8, 2023
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

1 participant