Home

Awesome

Entity-Linking-Tutorial

Docs for English

Docs for Japanese

Tutorial with Colab-Pro.

See here.

Environment Setup

# If you don't use colab-pro, create environment from conda.
$ conda create -n allennlp python=3.7
$ conda activate allennlp
$ pip install -r requirements.txt

Preprocessing

Models and Scoring

Models

Scoring

Experiment and Evaluation

$ rm -r serialization_dir # Remove pre-experiment result if you run `python3 main.py -debug` for debugging.
$ python3 main.py

Parameters

We only here note critical parameters for training and evaluation. For further detail, see parameters.py.

Parameter NameDescriptionDefault
batch_size_for_trainBatch size during learning. The more there are, the more the encoder will learn to choose the correct answer from more negative examples.16
lrLearning rate.1e-5
max_candidates_numDetermine how many candidates are to be generated for each mention by using surface form.5
search_method_for_faissThis specifies whether to use the cosine distance (cossim), inner product (indexflatip), or L2 distance (indexflatl2) when performing approximate neighborhood search.indexflatip

Result

batch_size_for_train: 16

batch_size_for_train: 48

LICENSE

MIT