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

观点抽取怎么使用 #83

Open
cooclzw opened this issue Feb 11, 2022 · 0 comments
Open

观点抽取怎么使用 #83

cooclzw opened this issue Feb 11, 2022 · 0 comments

Comments

@cooclzw
Copy link

cooclzw commented Feb 11, 2022

from senta import Senta

my_senta = Senta()
print(my_senta.get_support_model())
print(my_senta.get_support_task())
use_cuda = False
my_senta.init_model(model_class="roberta_skep_large_en", task="extraction", use_cuda=use_cuda)
texts = ["The JCC would be very pleased to welcome your organization as a corporate sponsor ."]
result = my_senta.predict(texts)
print(result)

怎么返回给我一个bio标注
[('The JCC would be very pleased to welcome your organization as a corporate sponsor .', ['O', 'I_H', 'B_DS', 'B_DS', 'B_DS', 'B_DS', 'I_T', 'I_T', 'I_T', 'I_T', 'I_T', 'I_T', 'I_T', 'O', 'O'])]

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