Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit 61010eb Jun 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
jrk remove some prints Jun 17, 2019
LICENSE Initial commit Feb 4, 2019
README.md Update README.md Jun 17, 2019

README.md

dl4el: A distant learning approach for entity linking

A Python implementation of ACL2019 paper

[1] Phong Le and Ivan Titov. Distant Learning for Entity Linking with Automatic Noise Detection. ACL 2019.

Written and maintained by Phong Le (lephong.xyz [at] gmail.com)

Installation

Requirements: Python 3.7, Pytorch 0.4, CUDA 8

Usage

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

Data

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

The new training set (170k sentences, based on the New York Time corpus) is at

data/freebase/el_annotation/el_annotated_170k.json

The dev and test sets (based on AIDA-CoNLL corpus) are at

data/EL/AIDA/test[a-b].json

Train

To train, from the main folder run

python3 -m jrk.el_main

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 3 hours for 20 epochs. The output is a model saved in two files: model.config and model.state_dict .

For more options, please have a look at jrk/el_hyperparams.py

Evaluation

Execute

python3 -m jrk.el_main --mode eval 
You can’t perform that action at this time.