mayhewsw / ner-with-partial-annotations

Code for the CoNLL2019 paper on NER with Partial Annotations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NER with Partial Annotations

Code for the CoNLL2019 paper on NER with Partial Annotations. See also the paper in the ACL Anthology.

Installation

NOTE: this code uses AllenNLP 0.8.4 and ccg_nlpy. AllenNLP in particular has changed a lot since we wrote this code, so getting the right version is important!

$ pip install ccg_nlpy allennlp==0.8.4

Data & Embeddings

You can see some sample data in data/eng. These files have TextAnnotation format, from ccg_nlpy.

You will need to set paths in util.py for the embeddings, and the data.

If you want to use BERT instead regular embeddings, change USING_BERT in utils.py to true.

Running

For the main results:

$ python main_ours.py <lang>

For the others, the names should be self-explanatory!

Citation

If you use this code, please cite us!

@inproceedings{MCTR19,
    author = {Stephen Mayhew and Snigdha Chaturvedi and Chen-Tse Tsai and Dan Roth},
    title = {{Named Entity Recognition with Partially Annotated Training Data}},
    booktitle = {Proc. of the Conference on Computational Natural Language Learning (CoNLL)},
    year = {2019},
    url = "https://cogcomp.seas.upenn.edu/papers/MCTR19.pdf",
    funding = {LORELEI},
}

About

Code for the CoNLL2019 paper on NER with Partial Annotations


Languages

Language:Python 99.8%Language:Shell 0.2%