The GERBIL platform (Röder et al., 2018)
is an evaluation toolkit (publicly available online) that eliminates any mistakes and allows for a fair comparison
between methods. However, GERBIL is a Java toolkit, while most of modern entity linking work is done in Python.
GERBIL developers recommend using SpotWrapNifWS4Test
(a middleware tool written in Java) to connect Python entity
linkers to GERBIL. Because of the complexity of this setup, we have not been able to directly evaluate some of the
earlier publications due to software version mismatches and communication errors between Python and Java. This is a
drawback that discourages researchers from using GERBIL. To address this issue, in this package, we provide a Python
equivalent of SpotWrapNifWS4Test
, in Python, to encourage entity linking researchers to use GERBIL for fair
repeatable comparisons.
The provided template has two python source code files:
-
nif_parser.py
which provides the functionality to read the communicated messages from GERBIL and to write the annotated spans back to GERBIL, this file must not be changed and will be directly used by the integrated server. -
server_template.py
provides a template server in which you can import your implemented entity linking model and evaluate it using GERBIL (Röder et al., 2018). All the communication parts are worked out, and you will only need to replacemock_entity_linking_model
with your model and load up its required resources ingeneric_annotate
method.
The provided template supports both Wikipedia in-domain test sets (i.e. AIDA-CoNLL) and out-of-domain test sets (e.g. KORE).
At the end, the annotation results will be stored in annotate_{annotator_name}_result.json
.
For a completed example, please see server.py
in spel
package.
- Checkout GERBIL repository and run
cd gerbil/ && ./start.sh
- It will require Java 8 to run.
- Once gerbil is running, run
python server_template.py
with your modifications which replacesmock_entity_linking_model
with your entity linker. It will start listening onhttp://localhost:3002/
. - Open a browser and type in
http://localhost:1234/gerbil/config
, this will open up the visual experiment configuration page of GERBIL. - Leave
Experiment Type
asA2KB
, forMatching
chooseMa - strong annotation match
, and forAnnotator
set a preferred name (e.g.Experiment 1
) and inURI
sethttp://localhost:3002/annotate_aida
.- You can also set the
URI
tohttp://localhost:3002/annotate_wiki
forMSNBC
dataset, tohttp://localhost:3002/annotate_dbpedia
forOKE
,KORE
, andDerczynski
datasets, and tohttp://localhost:3002/annotate_n3
forN3
Evaluation datasets.
- You can also set the
- Choose your evaluation
Dataset
s, for example chooseAIDA/CoNLL-Test A
andAIDA/CoNLL-Test B
for evaluation on AIDA-CoNLL. - Check the disclaimer checkbox and hit
Run Experiment
. - Let GERBIL send in the evaluation documents (from the datasets you selected) one by one to the running server. Once it is done you can click on the URL printed at the bottom of the page (normally of the format
http://localhost:1234/gerbil/experiment?id=YYYYMMDDHHMM
) to see your evaluation results.