The DBpedia Lookup is an entity retrieval service for Linked Data. It provides a straightforward solution for the frequent use case of resolving keywords and natural language to related resource identifiers in the DBpedia knowledge graph. Related means that either the label or abstract of a resource matches, or an anchor text that was frequently used in Wikipedia to refer to a specific resource matches (e.g. the resource http://dbpedia.org/resource/United_States can be looked up by the string “USA”).
So whether you need an auto-complete service for your RDF application, Linked Data enhancements for your CSV tables or simply a way to retrieve specific DBpedia identifiers – the DBpedia Lookup is for you!
As a part of the DBpedia Technology Stack the DBpedia Lookup can be deployed conveniently via Docker and works well with DBpedia Databus Collections. The DBpedia Lookup uses an Apache Lucene Index for resource indexing and retrieval and provides a web interface for querying.
Customizable Searching and Scoring
The DBpedia Lookup is an instance of the highly customizable Generic Lookup. The configuration files for keyword and prefix search can be adjusted even further to fit your use case.
The configuration lets you tweak every detail of the indexing and search process, from the desired document fields to the scoring function. The dockerized deployment facilitates the process of hosting your own customized DBpedia Lookup.
The keyword search configuration and index can be used to find related DBpedia resources for a given string. The string may consist of a single or multiple words. Querying for the keyword “Berlin” will retrieve http://dbpedia.org/resource/Berlin and other related dbpedia resources.
Prefix Search (i.e. Auto-complete)
The auto-complete configuration and index can be used to implement autocomplete input boxes. For a given partial keyword like “berl” the API returns URIs of related DBpedia resources (e.g. http://dbpedia.org/resource/Berlin).
The DBpedia Lookup now provides result sets in different formats. While you can stick to the established and human-readable XML results you can opt for JSON results. These also include highlighting information on the matched fields that let you improve the user experience of your front-end application. The result format can be passed as a query parameter and thus works right out-of-the-box with the official DBpedia Lookup instance.
Search Parameters and Configuration
In order to specify your queries even further you can use additional search parameters. Some of the more prominent parameters are listed and explained below. Please refer to the documentation page for the full list of possible configurations.
- query: The keyword or keywords that you want to look up
- type or QueryClass: one or more DBpedia classes from the DBpedia ontology that the results should have. Using this parameter will only retrieve resources of the passed type or types
- maxResults: The maximum of amount of results that you want to retrieve
Running your own DBpedia Lookup
You can install the DBpedia Lookup and run it on your server. You can build your own index using Databus Collections or download pre-built indexes from the Databus directly. The full technical documentation and deployment instructions are availablehere.