You need to extract entity names using an NER software (e.g., SpaCy, Stanford NER), and resolve the names to knowledge base entities using the entity linking method.
Unlike Word2vec, this tool learns embeddings of entities (i.e., entries in Wikipedia) as well as words.
And although the model implemented in this tool is based on Word2vec's skip-gram model, it is extended using two submodels (Wikipedia link graph model and anchor context model).
Please refer to the documentation for details:
https://wikipedia2vec.github.io/wikipedia2vec/intro/
Author here.
More broadly, embedding is a mapping from objects (e.g., words and entities) to vectors of real numbers.
And as described in the mcxlog's comment, an entity refers to an entry in Wikipedia in this paper.
Thank you for your feedback! I am also interested in conducting experiments on extrinsic tasks such as text classification. In addition to word embeddings, Wikipedia2Vec also contains entity embeddings which are likely beneficial for these tasks, so I would like to design a model that uses both the word embeddings and entity embeddings.
Thanks :)
1) I think learning entity embeddings using the Doc2Vec (paragraph vector) model is an interesting idea, but we did not test it.
2) This tool was initially developed to address the entity linking task. Mapping words and entities into a same vector space enables to model the contextual information that is useful for entity linking. For details, please refer to this paper:
Joint Learning of the Embedding of Words and Entities for Named Entity Disambiguation: https://arxiv.org/pdf/1601.01343.pdf
Regarding word embedding algorithm, I am interested in supporting other models that uses subword information (e.g., Fasttext). Further, there have been proposed various recent models to learn entity representations from KB, and I plan to work on them.
We did not add Fasttext to our benchmarks because of a minor technical issue but we will work on it. Further, to conduct a fair comparison with ELMo, I think it is needed to use extrinsic tasks such as question answering and textual entailment.
The current code is written specifically for Wikipedia. However, its algorithm is portable for knowledge bases that contains articles and their entity annotations.
Please note that similar to other approaches (e.g., node2vec), Wikipedia2Vec learns embeddings for Wikipedia entities in addition to embeddings for words.
You need to extract entity names using an NER software (e.g., SpaCy, Stanford NER), and resolve the names to knowledge base entities using the entity linking method.