Coder Social home page Coder Social logo

att-chemdner's Introduction

Att-ChemdNER


This repo contains the source code and dataset for the following paper:

Dependency package

Att-ChemdNER uses the following dependencies:

Content

  • data
    • CHENDNER corpus
    • CDR corpus
  • models
    • The basic BiLSTM-CRF model
    • The Att-BiLSTM-CRF model
    • The 50-dimensional word embedding
  • src
    • backend
    • evaluation: evaluate result of NER task
    • activations.py: activation functions
    • initializations.py
    • loader.py: load the data set
    • model.py: build the model
    • nn.py: the layers of the network architecture
    • optimizaiton.py: optimization method
    • utils.py
    • train.py: train a basic BiLSTM-CRF model
    • AttenTrain.py: train a Att-BiLSTM-CRF model
    • tagger.py: tag the document using the BiLSTM-CRF model
    • AttenTrain.py: tag the document using the Att-BiLSTM-CRF model

Train a basic BiLSTM-CRF model

To train a basic BiLSTM-CRF model, you need to provide the file of the training set, development set,testing set and word embedding model, and run the train.py script:

python train.py --train trainfile --dev devfile --test testfile --pre_emb word_embedding.model 

Train a Att-BiLSTM-CRF model

To train our Att-BiLSTM-CRF model, you need to provide the file of the training set, development set,testing set and word embedding model, and run the AttenTrain.py script:

python AttenTrain.py --train trainfile --dev devfile --test testfile --pre_emb word_embedding.model 

Tag the documents using the BiLSTM-CRF model

Recognize the chemical entities from the documents using the pretrained BiLSTM-CRF model, and you need to provide the pretrained model, inputfile and outputfile:

python tagger.py --model BiLSTM-CRF.model --input inputfile --output outputfile

The inputfile should contain one document by line, and they have to be tokenized.

Tag the documents using the Att-BiLSTM-CRF model

Recognize the chemical entities from the documents using the pretrained Att-BiLSTM-CRF model, and you need to provide the pretrained model, inputfile and outputfile:

python Atten_tagger.py --model Att-BiLSTM-CRF.model --input inputfile --output outputfile

The inputfile should contain one document by line, and they have to be tokenized.


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.