Practical overview
When it fits
Use Relik when a Python NLP workflow needs entity linking, relation extraction or a retriever-reader pipeline over text.
Who it is for
- Developers adding entity linking or relation extraction to NLP applications.
- Researchers and practitioners building retriever-reader information-extraction pipelines.
Documented uses
- Link entity mentions in text to candidate entities.
- Extract entities and relations from input text using pretrained models.
- Retrieve candidate entities separately from reader-based extraction.
Requirements & limits
- The library is installed with pip; the README also documents optional dependency groups for training, FAISS and serving.
- The documented model-loading examples use Hugging Face model identifiers with
Relik.from_pretrained. - Retriever and reader components can be used together or separately; retriever-only use returns candidates.
- The README notes CPU-only availability for the PyPI FAISS package and gives separate Conda instructions for GPU FAISS.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run ReLiK for entity linking
Load the documented pretrained entity-linking model and process one text string.
Before you start
- ReLiK installed in the Python environment.
- The pretrained model
sapienzanlp/relik-entity-linking-large.
Steps
Import
Relikfromrelik.Load the model with
Relik.from_pretrained("sapienzanlp/relik-entity-linking-large").Call the loaded model with a text string, for example
relik("Michael Jordan was one of the best players in the NBA.").
Expected outcome
The call returns a `RelikOutput` containing the input text, entity spans, and candidate entities, as illustrated in the project README.
Guide limitations
- The documented example covers one input string and the named pretrained model; it does not establish performance or results for other models or inputs.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 18 October 2026
- Original website title
- SapienzaNLP/relik · Official homepage title · retained in its source language

