Skip to content

lephong/mulrel-nel

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
nel
 
 
 
 
 
 

mulrel-nel: Multi-relational Named Entity Linking

A Python implementation of Multi-relatonal Named Entity Linking described in

[1] Phong Le and Ivan Titov (2018). Improving Entity Linking by Modeling Latent Relations between Mentions. ACL 2018.

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

Installation

  • Requirements: Python 3.5 or 3.6, Pytorch 0.3, CUDA 7.5 or 8

Usage

The following instruction is for replicating the experiments reported in [1].

Data

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

Train

To train a 3-relation ment-norm model, from the main folder run

export PYTHONPATH=$PYTHONPATH:../
python -u -m nel.main --mode train --n_rels 3 --mulrel_type ment-norm --model_path model

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

Evaluation

Execute

python -u -m nel.main --mode eval --model_path model

About

named entity linking with latent relations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages