-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Support segmented inputs for ddparser #1351
Conversation
docs/model_zoo/taskflow.md
Outdated
@@ -141,6 +141,11 @@ ddp("9月9日上午纳达尔在亚瑟·阿什球场击败俄罗斯球员梅德 | |||
ddp = Taskflow("dependency_parsing", model="ddparser-ernie-1.0") | |||
ddp("9月9日上午纳达尔在亚瑟·阿什球场击败俄罗斯球员梅德韦杰夫") | |||
>>> [{'word': ['9月9日', '上午', '纳达尔', '在', '亚瑟·阿什球场', '击败', '俄罗斯', '球员', '梅德韦杰夫'], 'head': [2, 6, 6, 5, 6, 0, 8, 9, 6], 'deprel': ['ATT', 'ADV', 'SBV', 'MT', 'ADV', 'HED', 'ATT', 'ATT', 'VOB']}] | |||
|
|||
# 已分词方式 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已分词输入
我建议对这块的功能,采用文字(譬如API说明)+code block方式来呈现。
不要用整大块code block然后通过注释的方式来呈现,反而不够清晰
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
这里其实建议不要对forward函数进行特别多的处理,建议的话是在这个Task上新增一个接口来适配这个任务 ddp = Taskflow("dependency_parsing") |
@wawltor 已修改 |
docs/model_zoo/taskflow.md
Outdated
ddp = Taskflow("dependency_parsing", model="ddparser-ernie-1.0") | ||
ddp("9月9日上午纳达尔在亚瑟·阿什球场击败俄罗斯球员梅德韦杰夫") | ||
>>> [{'word': ['9月9日', '上午', '纳达尔', '在', '亚瑟·阿什球场', '击败', '俄罗斯', '球员', '梅德韦杰夫'], 'head': [2, 6, 6, 5, 6, 0, 8, 9, 6], 'deprel': ['ATT', 'ADV', 'SBV', 'MT', 'ADV', 'HED', 'ATT', 'ATT', 'VOB']}] | ||
``` | ||
|
||
#### 依存关系可视化 | ||
- 已分词输入: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用分词结果来输入:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
New features
PR changes
APIs
Description
Support segmented inputs for ddparser: