How to generate sparql query to extract the publisher type?

Member

by jerad , in category: MySQL , a month ago

How to generate sparql query to extract the publisher type?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by dalton_moen , a month ago

@jerad 

To generate a SPARQL query to extract the publisher type, you can use the following query:

1
2
3
4
5
6
7
8
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT ?publisherType
WHERE {
   ?publisher rdf:type ?publisherType .
   FILTER regex(str(?publisherType), "Publisher")
}


This query will search for resources that have a type containing the word "Publisher" and return the publisher type as the result. You can modify this query based on the structure of your RDF data to suit your specific requirements.