Skip to content
Code for the paper "Fine-Grained Entity Typing in Hyperbolic Space"
Python Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
data/type-embeds Adding bias on train Jun 5, 2019
scripts Merge branch 'master' of Jun 5, 2019
LICENSE Update bibtex Aug 12, 2019
environment.yml Inference script and README May 31, 2019 Minor fixes Jun 5, 2019 Merge branch 'master' of Jun 5, 2019

Fine-Grained Entity Typing in Hyperbolic Space

Code for the paper "Fine-Grained Entity Typing in Hyperbolic Space" published at RepL4NLP @ ACL 2019

Model overview:


The source code and data in this repository aims at facilitating the study of fine-grained entity typing. If you use the code/data, please cite it as follows:

    title = "Fine-Grained Entity Typing in Hyperbolic Space",
    author = "L{\'o}pez, Federico  and
      Heinzerling, Benjamin  and
      Strube, Michael",
    booktitle = "Proceedings of the 4th Workshop on Representation Learning for NLP (RepL4NLP-2019)",
    month = aug,
    year = "2019",
    address = "Florence, Italy",
    publisher = "Association for Computational Linguistics",
    url = "",
    pages = "169--180",


  • PyTorch 1.1
  • tqdm
  • tensorboardX
  • pyflann

A conda environment can be created as well from the environment.yml file.

To embed the graphs into the different metric spaces the library Hype was used.

Running the code

1. Download data

Download and uncompress Ultra-Fine dataset and GloVe word embeddings:

./scripts/ get_data

2. Preprocess data

The parameter freq-sym can be replaced to store different preprocessing configurations:

./scripts/ preprocess freq-sym

3. Train model

The name of the preprocessing used in the previous step must be given as a parameter.

./scripts/ train freq-sym

3. Do inference

./scripts/ inference freq-sym


We thank to Choi et al for the release of the Ultra-Fine dataset and their model.



You can’t perform that action at this time.