Giter Club home page Giter Club logo

bd_event-extraction's Introduction

BD_event-extraction

百度2020语言与智能技术竞赛:事件抽取赛道方案代码

说明

这是首次参加事件抽取比赛,由于其他事情的繁忙,只参与了第一阶段的线上评测,F1值达到0.78, 这里把事件抽取当成两阶段任务,先做事件触发词检测,再做事件论元检测,每阶段都是当作一个序列标注任务 采用pipeline模型,网络的主体架构采用BERT+LSTM来分别进行触发词的识别和论元角色的分配。

使用

准备

1、

pip install pytorch pytorch_pretrained_bert numpy

2、下载pytorch版本的bert_base_chinese和bert-base-chinese-vocab.txt到主目录下

训练、测试

python train.py

总结

事件抽取在这次的任务中不需要识别出句子中的触发词,只需要识别出句子所对应的事件类型,所以不同于常见的事件抽取任务定义。

可将该问题看成论元-(事件类型-角色)的多分类任务,共65个事件类型,将<事件类型-论元>组合得到共217种类别,如<死亡-时间>、<死亡-地点>等,这样就可以做一个联合抽取的模型。

由于这些方法都没法解决论元角色覆盖问题,可以采用序列标注的混合多标签来解决这个问题,可参考论文 [Neural Architectures for Nested NER through Linearization]

Reference

  • Nlpcl-lab's bert_event_extraction repository [github]

bd_event-extraction's People

Contributors

ll0ruc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.