SPARQL Query Language Tag Script

It works:

SELECT * WHERE{
?x rdfs:label "Chalti Ka Naam Gaadi"@en .
?x foaf:name ?z .    
}

( Results in DBpedia SPARQL Explorer )

It does not mean:

SELECT * WHERE{
?x foaf:name "Chalti Ka Naam Gaadi" .
?x rdfs:label ?z .    
}

( Results in DBpedia SPARQL Explorer )

Why?

+2
source share
1 answer

Your problem is that simple literals with language tags are: "Chalti Ka Naam Gaadi"@en

is not the same as simple literals without language tags: "Chalti Ka Naam Gaadi"

Literals are structured things made from the lexical part, language (maybe) or data type (maybe).

You can filter: FILTER ( str( ?name ) = "Chalti Ka Naam Gaadi")

( str()returns the lexical part of the literal)

but depending on the request mechanism, this will be much slower.

+10
source

Source: https://habr.com/ru/post/1658849/


All Articles