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

关于代码seq_util.py的几个疑问 #18

Open
LiuHongYi222 opened this issue Nov 23, 2020 · 3 comments
Open

关于代码seq_util.py的几个疑问 #18

LiuHongYi222 opened this issue Nov 23, 2020 · 3 comments

Comments

@LiuHongYi222
Copy link

对于该代码的 17行是否应该改成
原始代码>> if cur_ts_tag == 'O' or cur_ts_tag == 'EQ':
新代码 assert cur_ts_tag != 'EQ' #(OT序列的话只有O,T-SENTIMENT 不会有EQ)
if cur_ts_tag == 'O' :

对于该代码的 114行是否应该这样考虑:
原始代码: if ts_tag == 'O' or ts_tag == 'EQ':
新代码:
if ts_tag == 'EQ': continue #(EQ是BERT的wordpiece出来的,应该不考虑到序列中,不应该用O代替)
if ts_tag == 'O' : 后续内容不变

以上是两个关于代码的小疑问,感谢作者解答。
祝好

@lixin4ever
Copy link
Owner

lixin4ever commented Nov 25, 2020

抱歉我昨天没理解你的问题
首先,这里操作的tag都是word-level的tag,而不是subword-level的tag
Q1: 因为预测的时候词的tag可能是EQ,所以必须要考虑cur_ts_tag == 'EQ'的情况
Q2: 同Q1

@AliceYang0-0
Copy link

您好,请问EQ代表什么呢?因为您在论文中只列出了B-{POS,NEG,NEU}, I-{POS,NEG,NEU}, E-{POS,NEG,NEU}, S-{POS,NEG,NEU} or O作为可能的标注。

抱歉我昨天没理解你的问题
首先,这里操作的tag都是word-level的tag,而不是subword-level的tag
Q1: 因为预测的时候词的tag可能是EQ,所以必须要考虑cur_ts_tag == 'EQ'的情况
Q2: 同Q1

@lixin4ever
Copy link
Owner

EQ(equivalent)代表non-head subwords的tag,这里的head subword你可以理解为第一个subword

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

3 participants