Skip to content
PyTorch implementation of our paper "Imposing Label-Relational Inductive Bias for Extremely Fine-Grained Entity Typing"
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data add folders Mar 6, 2019
exp path issue Mar 6, 2019
exp_onto
imgs
resources
.DS_Store
.gitignore
LICENSE
README.md
analysis.py
attention.py
baseline.py
baseline.sh release Mar 6, 2019
config_parser.py
data_utils.py path issue Mar 6, 2019
eval_metric.py
inconsistency.sublime-workspace
label_corr.py
main.py release Mar 6, 2019
model_utils.py
models.py
run.sh release Mar 6, 2019
run_gcn_onto.sh
run_label_gcn.sh release Mar 6, 2019
run_model_change.sh release Mar 6, 2019
run_onto.sh
run_regu.sh
scorer.py

README.md

Code for our NAACL 2019 paper:

Imposing Label-Relational Inductive Bias for Extremely Fine-Grained Entity Typing

Paper link: http://arxiv.org/abs/1903.02591

Model Overview:

Requirements

  • PyTorch 0.4.1
  • tensorboardX
  • tqdm
  • gluonnlp

Running the code

First prepare the dataset and embeddings

1. Ultra-Fine experiments (10331 free-text labels and millions of training data)

Train the best model on Ultra-Fine

CUDA_VISIBLE_DEVICES=1 python main.py $RUN_ID$ -lstm_type single -model_debug -enhanced_mention -data_setup joint -add_crowd -multitask -gcn

You can then test your saved model

CUDA_VISIBLE_DEVICES=1 python main.py $RUN_ID$ -lstm_type single -model_debug -enhanced_mention -data_setup joint -add_crowd -multitask -gcn -load -mode test -eval_data crowd/test.json

Ablation experiments

a) w/o gcn

CUDA_VISIBLE_DEVICES=1 python main.py $RUN_ID$ -lstm_type single -model_debug -enhanced_mention -data_setup joint -add_crowd -multitask

b) w/o enhanced mention-context interaction

CUDA_VISIBLE_DEVICES=1 python main.py $RUN_ID$ -lstm_type single -gcn -enhanced_mention -data_setup joint -add_crowd -multitask

2. Experiments on OntoNotes

Training

CUDA_VISIBLE_DEVICES=1 python main.py $RUN_ID$ -lstm_type single -enhanced_mention -goal onto -gcn

Testing

CUDA_VISIBLE_DEVICES=1 python main.py $RUN_ID$ -lstm_type single -enhanced_mention -goal onto -gcn -mode test -load -eval_data ontonotes/g_dev.json

Notes

The meaning of the arguments can be found in config_parser.py

Acknowledgement

We thank Choi et al for the release of the Ultra-Fine dataset and the basic model: https://github.com/uwnlp/open_type.

You can’t perform that action at this time.