Simple, but efficient model to retrieve entities in the given piece of text. The model uses BERT encoder for text and entities and fast HNSW index to retrieve nearest entities.
python main.py "Nobel Prize-winning physicist who developed the theory of general relativity."
First we need to download and wikipedia data:
scripts/download_wiki.sh
python scripts/preprocess_wiki.py
python train.py
python generate_entity_embeddings.py