1 Star 0 Fork 1

Roy1990/event_extraction

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

百度aistudio 2020 事件抽取赛道


update on 2020.07.09 优化了gen_kfold_data.py,重构了代码,能够生成event type分类任务的数据index_type_fold_data_{},以及role extraction阶段任务的数据verfify_neg_fold_data_{},注意所有文件的对应路径要与自己在config中配置的相同。另外,neg_fold_data_{}为之前老版本的数据存储格式,与verify_neg_fold_data_{}是一样的,可以一样使用

依赖包:主要是tensorflow 1.12.0,另外使用了bojone的bert4keras,详见https://github.com/bojone/bert4keras

,其余见requirements.txt

目前主要集中使用机器阅读理解的方式来尝试解决事件抽取任务。主要分为两个阶段:

1、事件类型抽取

2、事件论元抽取,使用MRC的方式来做。

具体内容见知乎文章。

项目主体来自于本人另一个repo,使用MRC做实体识别,具体可参考https://github.com/qiufengyuyi/sequence_tagging

最终使用Retro-reader方法,在test1.json上的分数为0.856,使用了roberta-large-wwm.

对于roberta-wwm-base,分数为0.851.

生成k-fold训练数据:

根据不同阶段,生成两个阶段的k-fold训练数据,具体可参考gen_kfold_data.py

事件类型抽取:

bash run_event_classification.sh

baseline事件论元抽取:

bash run_event_role.sh

RetroReader-EAV问题是否可回答模块:

bash run_retro_eav.sh

RetroReader-精读模块:

bash run_retro_rolemrc.sh
MIT License Copyright (c) 2020 qiufengyuyi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/roy1990/event_extraction.git
git@gitee.com:roy1990/event_extraction.git
roy1990
event_extraction
event_extraction
master

搜索帮助