user4208442
user4208442

Reputation:

extract the comment from DBpedia

So my question is simple: from this URI --

http://dbpedia.org/snorql/?describe=http%3A%2F%2Fdbpedia.org%2Fresource%2FRed_Dragon_%28spacecraft%29

-- I want to extract specific things like --

rdfs:comment
rdfs:label

how to do that ?

Upvotes: 1

Views: 219

Answers (1)

scotthenninger
scotthenninger

Reputation: 4001

Currently your query gets all properties, including rdfs:label and rdfs:comment. To get just those properties, substitute them for ?property, e.g.:

{ <http://dbpedia.org/resource/Red_Dragon_(spacecraft)> rdfs:label   ?label   .
  <http://dbpedia.org/resource/Red_Dragon_(spacecraft)> rdfs:comment ?comment .
}

Also, you may want to filter for language tags, e.g., FILTER (lang(?label) = "en).

Upvotes: 2

Related Questions