-
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
Add NPTag #1246
Add NPTag #1246
Conversation
task(string): The name of task. | ||
model(string): The model name in the task. | ||
batch_size(int): Numbers of examples a batch. | ||
linking(bool): Returns the categories. The fine-grained labels (cls_label) will link with the coarse-grained labels (category). |
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.
需要注明If true xxxx
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.
done
paddlenlp/taskflow/utils.py
Outdated
for i in range(1, m + 1): | ||
for j in range(1, n + 1): | ||
if s1[i - 1] != s2[j - 1]: | ||
if len(s1) == 1 or len(s2) == 1: |
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.
这个dp的判断是必须的吗?想这种长度唯一的边界判断是不是在初始化时候就可以完成了?
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.
fixed
paddlenlp/taskflow/utils.py
Outdated
|
||
|
||
class BurkhardKellerNode(object): | ||
"""Node implementation. |
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.
done
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
|
||
|
||
class BurkhardKellerNode(object): | ||
"""Node implementatation for BK-Tree. A BK-Tree node stores the information of current word, and its approximate words calculated by levenstein distance. |
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.
代码格式这里有yapf过吗?
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.
代码已整体yapf扫描
PR types
New features
PR changes
Models
Description
ErnieCtmNptagModel
&ErnieCtmMLMHead
ErnieCtmNptag
pretrained model parameters & weightsknowledge_mining-nptag
task for TaskflowErnieCtmNptagModel