Giter Club home page Giter Club logo

ner-expected-entity-ratio's Introduction

ner-expected-entity-ratio

Implementation and experiments for "Partially Supervised Named Entity Recognition via the Expected Entity Ratio Loss" to appear in TACL 2021.

Installation

Experiments were all run on a p3.2xlarge instance on AWS with the amazon deep learning AMI on ubuntu 18 using python 3.7. (You'll need at least 16GB of GPU ram to run these experiments as is.)

Install the required environment with: conda env create -f environment.yml

Then activate with: conda activate env

Usage

Getting the data

The CoNLL 2003 data from Mayhew et al. 19 is already in the data/ dir, but the ontonotes5 data must be created programmatically after you place the corpus directory into the data/ dir because of licensing restrictions.

Then in this order run the commands:

Convert the original Ontonotes5 corpus dataset format to ours

bash scripts/process_ontonotes_data.sh

Create the vocab files

bash scripts/make_vocabs.sh

Downsample the datasets

bash scripts/sample_datasets.sh

Running the experiments

Published experiments can all be run using the bash scripts in scripts/benchmark_runs, scripts/eer_variation_runs, and scripts/learning_curve_runs.

For example:

cd ner-expected-entity-ratio
conda activate env
bash scripts/benchmark_runs/run_o_bias_experiments.sh

Many of the experiments were done in parallel using remote nodes, so either this process needs to be reproduced, or the respective run_remote_ml_experiment invocations need to be converted to run_ml_experiment commands by removing the remote parameters.

Also, we've left out the codebases for the baselines (Mayhew et al. '19, Li et al. '21) because they aren't our works but if you need these let me know.

Codebase TOC

  • data: directory housing data. conll data already provided
  • experiments: contains base allennlp config files for running experiments and is where runs are logged
  • ml: source code
  • scripts: bash scripts for running experiments

Citing

If you make use of this code or information from the paper please cite:

@article{Effland2021PartiallySN,
  title={Partially Supervised Named Entity Recognition via the Expected Entity Ratio Loss},
  author={Thomas Effland and Michael Collins},
  journal={Transactions of the Association for Computational Linguistics},
  year={2021},
  volume={9},
  pages={1320-1335}
}

ner-expected-entity-ratio's People

Contributors

teffland avatar

Stargazers

YvanKOB avatar Liu Dongxiao avatar Xi Yang avatar  avatar ivan avatar  avatar Boyuan Zheng avatar Wei Liu avatar jianliu-ml avatar Jon Chun avatar Songlin Yang avatar Yu Zhang avatar Stefan Schweter avatar

Watchers

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