Spico197 / DocEE

🕹️ A toolkit for document-level event extraction, containing some SOTA model implementations.
https://doc-ee.readthedocs.io/
MIT License
232 stars 36 forks source link

论文中的一个问题 #88

Open ylxwan opened 2 months ago

ylxwan commented 2 months ago

您好,我在阅读论文的过程中,有一个地方不理解,想请您指导一下。在论文中2.3中“Non-Autoregressive Combination Decoding“这一小节中有一句这样的描述”For those extreme records that have only one argument in the combinations, all predicted entities are aggregated together as a default combination.“,我不太理解这句话是什么意思,感觉很突兀,和上下文接不上。

Spico197 commented 2 months ago

嗨您好,感谢您对我们工作的关注~

由于组合中的某个伪触发词可能缺失,因此在BK算法解码后,还可能会残留只有一个伪触发词的组合。这部分组合是一种特殊情况,需要单独纳入考量。可以结合代码进一步理解:

https://github.com/Spico197/DocEE/blob/a32b6f8bf0b2fe28b9942b0b53eff461abf561ba/dee/modules/adj_decoding.py#L241-L249

ylxwan commented 2 months ago

好的,谢谢您,我先自己阅读理解一下

ylxwan commented 2 months ago

老师,您好,请问这里为什么self_loop是false的时候,会将邻接矩阵的对角线置为1。这里是不是弄反了?还是我理解错了。 if self.config.self_loop: rel_adj_mat = ( doc_arg_rel_info.whole_arg_rel_mat.reveal_adj_mat( masked_diagonal=None, tolist=False ) .to(scores.device) .float() ) else: rel_adj_mat = ( doc_arg_rel_info.whole_arg_rel_mat.reveal_adj_mat( masked_diagonal=1, tolist=False ) .to(scores.device) .float()#给whole_arg_rel_mat主对角线置为1 )