Coder Social home page Coder Social logo

wnel's Introduction

wnel: A weakly supervised learning approach to 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. 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 take 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/wnel).

Train

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/main.py

wnel's People

Contributors

knuser avatar lephong avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.