Giter Site home page Giter Site logo

jincenziwu / chinese-event-extraction-pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jianwei-lv/chinese-event-extraction-pytorch

0.0 0.0 0.0 39 KB

一个简单的中文事件抽取模型,触发词和实体联合标注识别,同时判定实体角色。

Python 100.00%

chinese-event-extraction-pytorch's Introduction

chinese-event-extraction-pytorch

一个简单的用pytorch实现中文事件抽取的代码,写得不好,有待提高,希望对大家有所帮助。有问题欢迎留言。

环境

python 3.6

torch==1.0.1

pytorch-pretrained-bert==0.6.2

数据集

数据集是从新闻网站上爬下来,人工标注的,不方便全部公开(虽然也没多少数据,而且标注质量也有待提高),nanhai_data文件夹下显示有10条json数据,以共参考数据格式。可以按照数据格式,更换自己的数据集。贡献人员:Lei Li; Panpan Jin; Kaiwen Wei; Jianwei Lv; Xiaoyu Li。

效果

bert_RNN:

识别分类 P R F1
触发词识别 0.689 0.752 0.719
触发词分类 0.591 0.644 0.616
论元识别 0.547 0.702 0.615
论元分类 0.446 0.572 0.510

运行

运行 run.py

通过序列标注(BIO标签)同时识别分类触发词和实体,将识别分类的触发词特征和实体特征拼接,进行角色分类。

预训练语言模型

bert模型放在bert_pretain目录下,三个文件:

pytorch_model.bin

bert_config.json

vocab.txt

预训练模型下载地址:

bert_Chinese: 模型 https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-chinese.tar.gz

词表 https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-chinese-vocab.txt

来自这里

参考仓库

项目1:https://github.com/649453932/Bert-Chinese-Text-Classification-Pytorch

项目2:https://github.com/nlpcl-lab/bert-event-extraction

chinese-event-extraction-pytorch's People

Contributors

jianwei-lv 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.