Giter Site home page Giter Site logo

albert_negfin's Introduction

BERTFinanceNeg

BERT-based Finance Negation Detection

Requirements

  • Python 3.6
  • PyTorch 1.0.0
  • pytorch-pretrained-bert

Usage

  • Train with command, optional arguments could be found in train.py
python train.py --model_name bert --batch_size 16 --save True 

Model

An overview of the BERT-based baseline is given below

ALBERT_ZH(Pytorch)

ALBERT_ZH(CHECHPOINT)

INPUT

for entity in entities:
    切割原文->(上文 + ' ' + entity + ' ' + 下文)
    input = ('[CLS]'+(上文 + ' ' + entity + ' ' + 下文)+'[SEP]'+entity+'[SEP]')
    output = bert(input)
    output_list.append(output)

Linux_test

可以修改的地方

  1. 可以修改数据处理函数
  2. bert的dense
  3. 可以集成学习
  4. 可以套albert

Experiment

| No | Model | Description | Score | | :------- | :---------: | :---------: | :---------: | | 1 | Bert | predict for each entity | 0.929 | | 2 | Bert + substring + NIKE | using heuristic method to tackle second task | 0.935 | | 3 | Mxnet_bert + substring + NIKE | predict for each text | 0.947 | | 4 | Test scoring rule | reverse task 1 result | 0.006 |

conception for improving

  • long_text_sentence
  • task 2 for train data
  • improving scale of the model

albert_negfin's People

Contributors

jinhuasu avatar

Stargazers

 avatar

Watchers

James Cloos avatar  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.