The Knowledge Base


Whenever Solve for All processes an answer query, it always searches its knowledge base, regardless of the plugins that a user has installed or activated. The knowledge base uses the DBpedia semantic data set, which is based on the data in Wikipedia, to recognize keywords in answer queries. Results are output as recognition results as if a Semantic Data Collection or Content Recognizer had matched content. These results have some special properties that can be used in Inline Answers, or to make further queries in plugins.

Recognition Keys

DBpedia identifies nouns with URLs in like this:

which Solve for All converts to the recognition key:


You can use the recognition keys found in an answer query to classify the answer query, and trigger an Answer Generator to run when one or more recognition keys are present.

Recognition Result Properties

Each recognition result produced by the knowledge base that is mapped to a recognition key starting with org.dbpedia.ontology. has the following properties:

Property Name Example Value Description
wikipediaArticleName Magic_Johnson The path of the Wikipedia article, relative to Also, used to lookup in the recognition results for the recognition key com.solveforall.recognition.WikipediaArticle (see below).
humanFormattedWikipediaArticle Magic Johnson The name of the Wikipedia article, in a format suitable for viewing by humans.

Wikipedia Article Recognition Results

If the knowledge base produces a recognition result with a recognition key starting with org.dbpedia.ontology., there will also be a a recognition result in the list of results mapped to the recognition key com.solveforall.recognition.WikipediaArticle. The results mapped to this recognition key have the following properties which are guaranteed to be present:

Property Name Example Value Description
article Magic_Johnson The same as the wikipediaArticleName property in recognition results mapped to org.dbpedia.ontology.* recognition keys.
title Magic Johnson The human-formatted title of the article.

To find more information related to a recognition result R mapped to a org.dbpedia.ontology.* recognition key, search the list of recognition results mapped to com.solveforall.recognition.WikipediaArticle for a recognition result W that satisfies the condition:

R.wikipediaArticleName = W.article

Note that multiple results mapped to org.dbpedia.ontology.* recognition keys may point to the same result mapped to com.solveforall.recognition.WikipediaArticle, because nouns can be classified as multiple types, which are sometime sub-types of each other. For example, Magic Johnson is a basketball player (org.dbpedia.ontology.BasketballPlayer), athlete (org.dbpedia.ontology.Athlete) and a person (org.dbpedia.ontology.Person). Magic Johnson was also a much better basketball player than the other MJ, but there's no recognition key for that.

Non-guaranteed Properties

Recognition results mapped com.solveforall.recognition.WikipediaArticle may also contain the following properties, which are not guaranteed to be present:

Property Name Example Value Description
longAbstract Earvin "Magic" Johnson Jr. (born August 14, 1959)
is a retired American professional basketball player ...
The long version of the abstract of the Wikipedia article
A link to a thumbnail image of the subject. Sometimes is a broken link that can be fixed by substituting /en/ for /commons/, or vice versa.
homePageUri The URI of the subject's home page
geoLocation { "lat" : 47.61982, "lon" : -122.348838 } The geolocation of the subject, measured in latitude degrees (lat) and longitude degrees (lon)
inLinkCount 192 The number of Wikipedia articles that link to the subject
outLinkCount 24 The number of links to other Wikipedia articles that the Wikipedia article for the subject contains

Developer Usage

If you want to see if the knowledge base can recognize keywords that you want to create answers for, try entering an answer query beginning with ??debug, followed by the keywords. You should be able to see the recognition results that are produced, and the results that have recognition keys that start with org.dbpedia.ontology. most likely came from the knowledge base, which is enabled for all users. For example, try ??debug Ron Paul.