Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit d278a6e Jun 17, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
nel small changes Jun 17, 2019
LICENSE Initial commit May 22, 2019 Update Jun 17, 2019

wnel: A weakly supervised learning approach for entity linking

A Python implementation of the approach proposed in

[1] Phong Le and Ivan Titov (2019). Boosting Entity Linking Performance by Leveraging Unlabeled Documents.

Written and maintained by Phong Le ( [at]


Requirements: Python 3.7, Pytorch 0.4, CUDA 8


The following instruction is for replicating the experiments reported in [1]. Note that training and testing take lots of RAM (about 30GB) because some files related to Freebase have to be loaded.


Download data from here and unzip to the main folder (i.e. your-path/wnel).


To train, from the main folder run

python3 -u -m nel.main --mode train --inference star --multi_instance --n_negs 5 --margin 0.1 --n_rels 1  --eval_after_n_epochs 6 --n_epochs 6  --ent_top_n 30 --preranked_data data/generated/test_train_data/preranked_all_datasets_50kRCV1_large --n_not_inc 50 --n_docs 50000

IMPORTANT: if you want to train the model from scratch, you have to remove the current saved model (if exists, by rm model.*).

Using a GTX 1080 Ti GPU it will take about 30 minutes. The output is a model saved in two files: model.config and model.state_dict .

For more options, please have a look at nel/

You can’t perform that action at this time.