# ONE-VS-ALL AUC MAXIMIZATION NER

This is the code repository for the paper: ONE-VS-ALL AUC MAXIMIZATION: AN EFFECTIVE SOLUTION TO THE LOW-RESOURCE NAMED ENTITY RECOGNITION PROBLEM.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install for the environment .
- Ubuntu 20.04 LTS
- Create virtual environment with Python 3.8
- Run following commands:

```bash
pip install -r requirements.txt
pip3 install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
```

Please note that sometimes you need to download "punkt" for the training to work

```
import nltk
nltk.download('punkt')
```

## Folder information

- data : It includes the experiment datasets of CoNLL, NCBI and s800.
- ner: It includes the experiment source codes for the model.
- results: It includes the experiment results.
- train: It includes the experiment scripts for running.

## Run experiment
- Sentence level
```
sh train/LowResources/baselines.sh
sh train/LowResources/ova.sh
```
- Imbalance of entity level
```
sh train/Imbalance/baselines.sh
sh train/Imbalance/ova.sh
```

## Ontonotes 5.0
For ontonotes 5.0, please refer to the following [link](https://catalog.ldc.upenn.edu/LDC2013T19) for download instructions. Parsing instructions can be found at [here](https://github.com/nsu-ai/ontonotes-5-parsing).
