I use the periodicTable.owl from http://www.daml.org/2003/01/periodictable/. Each chemical element has a name e.g. "helium". I am now trying to gather more information about an element from dbpedia via the rdfs:label.
I tried this as an example:
PREFIX table: <http://www.daml.org/2003/01/periodictable/PeriodicTable#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT ?element ?abstract
WHERE
{
?element rdf:type table:Element .
?element table:name ?name .
?dbr rdfs:label ?name .
OPTIONAL{?dbr dbo:abstract ?abstract} .
}
So the idea is to connect each of the elements in the periodictable to the corresponding dbpedia resource via the rdfs:label property and return the abstract if there is one like here: https://dbpedia.org/page/Helium
This does not work. Any suggestions why?
In http://www.daml.org/2003/01/periodictable/PeriodicTable.owl, the names are literals with the datatype
xsd:string. In DBpedia (at least in this case), the labels are literals with the datatyperdf:langString+ a language tag.These three labels have the same lexical form, but they are different literals (see Literal Equality):
To compare their lexical forms, you can use SPARQL’s
str()in aFILTER:Notes:
LCASE/UCASE.