Subgraph Retrieval Toolkit (SRTK)

The Subgraph Retrieval Toolkit (SRTK) is a Python-based toolkit for retrieving subgraphs from large-scale knowledge graphs. SRTK provides a unified interface to access multiple knowledge graphs, including Wikidata and Freebase, and ships with state-of-the-art subgraph retrieval algorithms.

SRTK CLI Interface supports the following subcommands:

  • preprocess: Preprocess a dataset for training a subgraph retrieval model.

  • train: Train a subgraph retrieval model on a preprocessed dataset.

  • link: Link entity mentions in a text to a knowledge graph. Currently only Wikidata is supported out of the box.

  • retrieve: Retrieve a semantic-relevant subgraph from a knowledge graph with a trained retriever. It can also be used to evaluate a trained retriever.

  • visualize: Visualize a retrieved subgraph using a graph visualization tool.

Besides, srtk can also be used as a python library.

Tutorials