baidu / baidu/Senta

预测中文观点抽取任务demo中少个变量

Open
#85 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2k
Forks
361
PR merge metrics
No merged PRs in 30d

Description

# 预测中文观点抽取任务
my_senta.init_model(model_class="ernie_1.0_skep_large_ch", task="extraction", use_cuda=use_cuda)
texts = ["唐 家 三 少 , 本 名 张 威 。"]
result = my_senta.predict(texts, aspects)
print(result)

此处应该是少了个:
aspects = ["张威"]

Contributor guide

No contributing guide indexed for this repository

Research direction

Open the Chinese opinion-extraction demo containing the shown snippet and run it to reproduce the undefined-variable problem. Check the example around the predict call; it is done when the demo defines the aspect list before prediction and runs successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, machine-learning
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.