Skip to content

PyTorch implementation of our paper "Imposing Label-Relational Inductive Bias for Extremely Fine-Grained Entity Typing" (NAACL19)

License

Notifications You must be signed in to change notification settings

xwhan/Extremely-Fine-Grained-Entity-Typing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

PyTorch implementation of our paper "Imposing Label-Relational Inductive Bias for Extremely Fine-Grained Entity Typing" (NAACL19)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published