syuoni / eznlp

Easy Natural Language Processing
Apache License 2.0
130 stars 21 forks source link

有关Boundary smoothing #41

Closed starxiaoliu closed 8 months ago

starxiaoliu commented 11 months ago

您好,我想问一下代码里边有关Boundary smoothing的部分,是对于损失函数的改进么,我看了代码,感觉是对损失函数上边的改进,您能否帮我解答一下,这个Boundary smoothing部分的代码,谢谢您了!

syuoni commented 10 months ago

您好,

在技术上,Boundary smoothing 确实只是(在交叉熵的基础上)修改了损失函数,非常类似 Label smoothing。实现参考此处代码:https://github.com/syuoni/eznlp/blob/29eda45aa2e13adfc76d22b2cbc229ee10fcf02a/eznlp/model/decoder/boundaries.py#L167-L185

更具体的解释请看 Boundary Smoothing for Named Entity Recognition 论文的 Methods 部分。谢谢