syuoni / eznlp

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

调用decode #51

Open houyuchao opened 1 month ago

houyuchao commented 1 month ago

作者您好,我想请教一下我想在entity_recognition主程序中,调用BoundarySelectionDecoder类中的decode方法,但是缺乏non label,我无法在主程序对应到BoundarySelectionDecoder类中的config参数,有什么办法吗? image image

syuoni commented 1 month ago

entity_recognition.py 里调用 boundary smoothing 的代码在这里:https://github.com/syuoni/eznlp/blob/master/scripts/entity_recognition.py#L244-L259

请参考代码原本的使用方法进行修改。你的代码片段中 args 是不能传入 BoundarySelectionDecoder 的。