Code Monkey home page Code Monkey logo

chinese_coreference_resolution's Introduction

SpanBERT for Chinese Coreference Resolution (Pytorch)

📒 1. 代码架构:

│ conll.py
│ coreference.py
│ demo.py
│ metrics.py
│ utils.py
│ experiments.conf
│ requirements.txt
│
├─bert
│ │ modeling.py
│ │ optimization.py
│ │ tokenization.py
│ 
├─conll-2012
│ └─scorer
│ ├─reference-coreference-scorers
│ └─v8.01
├─data
│ ├─dev 
│ ├─test 
│ └─train
│ 
└─pretrain_model
 │ bert_config.json
 │ pytorch_model.bin 
 │ vocab.txt

其中

conll.py:验证集验证所需脚本

coreference.py:指代消解模型脚本

demo.py:指代消解工程测试脚本

metrics.py:验证集计算指标脚本

utils.py:数据转换,文件读写脚本

experiments.conf:代码运行所需参数配置文件

requirements.txt:代码运行必要环境文件

bert:用于存放bert模型相关脚本文件

conll-2012:官方提供的验证文件

data:用于存放训练验证预测文件以及最后预测的结果文件

pretrain_model:用于存放预训练模型(包含模型、参数配置文件、字典)

📙 2. 运行环境

  • 运行环境要求python版本在3.5及以上,运行环境配置见requirements.txt
  • 一块TITAN xp , 参数选择[ffnn_size=2000,nun_epochs=30],需要7小时左右

📗 ​3. 运行方式

  • experiments.conf文件中配置好向相应的参数,命令行运行:python demo.py 即可,默认使用第三块GPU(编号为2)。

📗 ​4. 结果(有点忘了是否是这个loss对应这个结果)

loss image

chinese_coreference_resolution's People

Contributors

troublemaker-r 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.