Giter Site home page Giter Site logo

shulinway / ccks-2020-finance-transfer-ee-baseline Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xyionwu/ccks-2020-finance-transfer-ee-baseline

0.0 1.0 0.0 791 KB

CCKS2020面向金融领域的小样本跨类迁移事件抽取baseline

Python 100.00%

ccks-2020-finance-transfer-ee-baseline's Introduction

数据及预训练模型准备

(1)将比赛数据集train.json和test.json放置在dataset文件中 (2)将预训练模型放置在pretrained_model中, 对于分类模型,可在CCKS-Bert-Multi-Label-Text-Classification\pybert\configs\basic_config.py进行路径修改 对于阅读理解模型,可在CCKS-Mrc\config\args.py进行路径修改 (3)可在以下地址自行下载pytorch pretrained_model:https://github.com/ymcui/Chinese-BERT-wwm (4)注意预训练模型里面文件名与代码config中设置的一致

先训练Cls分类模型

(1)数据预处理:python Cls_data_preprocess.py (2)数据切分: python run_bert.py --do_data to preprocess data (3)模型训练:python run_bert.py --do_train --save_best (4)模型推断: python run_bert.py --do_test

后训练Mrc阅读理解模型

(1)数据预处理:python Mrc_data_preprocess.py (2)数据切分: python get_data.py (3)模型训练:python train_start.py (4)模型推断: python test.py

生成比赛提交文件

(1)python get_submission.py

注意:

(1)请严格按照顺序运行命令 (2)请按照requirements.txt配置环境 (2)可自行更换预训练模型,或者在config中更改如epoch等参数进行调参优化 (3)本代码只提供基础的思路,欢迎在此基础上继续做模型改进和优化

ccks-2020-finance-transfer-ee-baseline's People

Contributors

xyionwu avatar

Watchers

 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.