Reputation: 42957
I have to introduce some SPARQL query toward DBpedia into a Prolog program. I am a beginner in the Semantic Web world and I don't know well it. I am asking if there is some way to implement a query that, given a word as input, tells me whether this word names an historical period.
For example, I pass to the query a word like: Jurassic or Cretaceous or Middle Age and it say me if this word is an historical period or something related to it.
Upvotes: 1
Views: 196
Reputation: 85853
For these kind of problems, it is useful to manually explore the data in DBpedia and to try to find some relevant properties that you can query. For instance, the DBpedia page for the Jurassic period shows that there does not seem to be much type hierarchy in organizing those types of periods. However, there is the one triple:
dbpedia:Jurassic dbpprop:wikiPageUsesTemplate dbpedia:Template:Geological_period
which suggests that the following query might retrieve some periods:
PREFIX template: <http://dbpedia.org/resource/Template:>
SELECT * WHERE {
?period dbpprop:wikiPageUsesTemplate template:Geological_period .
}
The page for the Middle Ages is not nearly so helpful, and I am not sure, in general, what a good DBpedia-based solution for this problem is. There is a useful Wikipedia article, Historical period, most of whose outbound links are names of historical periods.
The Jurassic link above goes to http://dbpedia.org/resource/Jurassic (which actually redirects to http://dbpedia.org/page/Jurassic, and there you can browse the data about the corresponding Wikipedia article. According to Denoting or Naming “things” in the DBpedia wiki:
Each thing in the DBpedia data set is denoted by a de-referenceable IRI- or URI-based reference of the form http://dbpedia.org/resource/Name, where Name is derived from the URL of the source Wikipedia article, which has the form http://en.wikipedia.org/wiki/Name. Thus, each DBpedia entity is tied directly to a Wikipedia article. Every DBpedia entity name resolves to a description-oriented Web document (or Web resource).
Until DBpedia release 3.6, we only used article names from the English Wikipedia, but since DBpedia release 3.7, we also provide Internationalized Datasets that contain IRIs like http://xx.dbpedia.org/resource/Name, where xx is a Wikipedia language code and Name is taken from the source URL, http://xx.wikipedia.org/wiki/Name.
Upvotes: 5