While performing the query giving error, syntax error at ',' before '_New_South_Wales'.
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX dbp: <http://dbpedia.org/property/>
PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX grs: <http://www.georss.org/georss/>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
SELECT ?label ?country ?isPartOf ?_type ?capital ?lcity ?geopoint
WHERE {
{ dbr:Eraring,_New_South_Wales rdfs:label ?label . FILTER(LANGMATCHES(LANG(?label), "en"))}
UNION{OPTIONAL{dbr:Eraring,_New_South_Wales dbo:country ?country} }
UNION{OPTIONAL{dbr:Eraring,_New_South_Wales dbo:isPartOf ?isPartOf}}
UNION{OPTIONAL{dbr:Eraring,_New_South_Wales <http://purl.org/linguistics/gold/hypernym> ?_type}}
UNION{OPTIONAL{dbr:Eraring,_New_South_Wales dbo:capital ?capital}}
UNION{OPTIONAL{dbr:Eraring,_New_South_Wales dbo:largestCity ?lcity}}
UNION{OPTIONAL{dbr:Eraring,_New_South_Wales grs:point ?geopoint}}
}
complete error report is as follows.
Virtuoso 37000 Error SP030: SPARQL compiler, line 21: syntax error at ',' before '_New_South_Wales' SPARQL query: #output-format:application/sparql-results+json define input:default-graph-uri PREFIX owl: PREFIX xsd: PREFIX rdfs: PREFIX rdf: PREFIX foaf: PREFIX dc: PREFIX : PREFIX dbpedia2: PREFIX dbpedia: PREFIX skos: PREFIX dbo: PREFIX dbp: PREFIX dbr: PREFIX grs: PREFIX geo: SELECT ?label ?country ?isPartOf ?_type ?capital ?lcity ?geopoint WHERE { { dbr:Eraring,_New_South_Wales rdfs:label ?label . FILTER(LANGMATCHES(LANG(?label), "en"))} UNION{OPTIONAL{dbr:Eraring,_New_South_Wales dbo:country ?country} } UNION{OPTIONAL{dbr:Eraring,_New_South_Wales dbo:isPartOf ?isPartOf}} UNION{OPTIONAL{dbr:Eraring,_New_South_Wales ?_type}} UNION{OPTIONAL{dbr:Eraring,_New_South_Wales dbo:capital ?capital}} UNION{OPTIONAL{dbr:Eraring,_New_South_Wales dbo:largestCity ?lcity}} UNION{OPTIONAL{dbr:Eraring,_New_South_Wales grs:point ?geopoint}} }
here is the link where you can test this query yourself. snorql