Giter Site home page Giter Site logo

deep_exhaustive_model's Introduction

An Implementation of Deep Exhaustive Model for Nested NER

Original paper: Sohrab, M. G., & Miwa, M. (2018). Deep Exhaustive Model for Nested Named Entity Recognition. In 2018 EMNLP

Requirements

  • python 3.6.7
  • pytorch 1.0.0
  • numpy 1.15.3
  • gensim 3.6.0
  • scikit-learn 0.20.0
  • joblib 0.12.5

Data Format

Our processed GENIA dataset is in ./data/.

The data format is the same as in Neural Layered Model, Ju et al. 2018 NAACL

Each line has multiple columns separated by a tab key. Each line contains

word	label1	label2	label3	...	labelN

The number of labels (N) for each word is determined by the maximum nested level in the data set. N=maximum nested level + 1 Each sentence is separated by an empty line. For example, for these two sentences, John killed Mary's husband. He was arrested last night , they contain four entities: John (PER), Mary(PER), Mary's husband(PER),He (PER). The format for these two sentences is listed as following:

John    B-PER   O   O
killed  O   O   O
Mary    B-PER   B-PER   O
's  O   I-PER   O
husband O   I-PER   O
.   O   O   O

He    B-PER   O   O
was  O   O   O
arrested  O   O   O
last  O   O   O
night  O   O   O
.  O   O   O

Pre-trained word embeddings

Setup

Download pre-trained embedding above, unzip it, and place PubMed-shuffle-win-30.bin into ./data/embedding/

Usage

Training

python3 train.py

trained best model will be saved at ./data/model/

Testing

set model_url to the url of saved model in training in main() of eval.py

python3 eval.py

deep_exhaustive_model's People

Contributors

csjd avatar fracivilization 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.