I have a list of approximately 6k wikidata instance IDs (beginning Q#####) I want to look up the human-readable labels for. I am not too familiar with SPARQL, but following some guidelines have managed to find a query that works for a single…
I'm querying a database in GraphDB using SPARQLWrapper. Insert is working fine but when the query is SELECT, I get HTTP 406 using GET method and HTTP 415 using POST. Similar Select query works on other databases like wikidata but not on GraphDB.…
So I know that in order to run SPARQL statements against a local ttl file I use rdflib. In order to run SPARQL statements against dbpedia I run Sparqlwrapper. But how do I do both? i.e. suppose I have a local ttl file and I want to leverage some…
Please find below query, which gives 406 error when I try to query the sparql endpoint. I am not sure why. Could anyone help me with this? Thanks in advance.
from SPARQLWrapper import SPARQLWrapper, JSON, POST, DIGEST
import json
sparql =…
I have also added the snippet below. This query will return the name of the company uri, its name and parent company. It is working with DBpedia.org/sparql but not with sparqlwrapper(not returning anything; )
query1 = """
PREFIX rdfs:…
I have some basics of programming, but I am completely new to RDF or Sparql, so I hope to be clear in what follows.
I am trying to download some data available at http://data.camera.it/data/en/datasets/, and all the data are organized in rdf-xml…
I'm using python3 to make SPARQL queries. I need to read a Virtuoso database and output triples. Some of the data in the triples contains special characters like linefeeds and such.
Anyway, I can get the data out like this:
queryString = "some…
Is there a module or tool in Python that will help me visualize RDF data?
I have a N-Triple file and want to load it in python and display the information in it visually. I am currently using RDFLib but it does not have a visualize function. Thank…
The following code should return a dictionary of the subject of all triples in the ontology. It, instead, returns the entire ontology as an XML string.
from SPARQLWrapper import SPARQLWrapper, JSON
sparql =…
I'm writing a python code to retrieve all actors which is common to both DBpedia and Wikidata. And also getting some additional information like awards received from wikidata. But its throwing an error.
I'm not sure how to correct this error. Here…
I am trying to get some information of the DBpedia page of Rodger Federer. I want to query in which years Roger Federer was flagbearer at the Olympic Games. I can extract information from normal property fields (dbp:plays), but not if the property…
I've installed openrdf-sesame and openrdf-workbench (2.8.6) under tomcat7 on ubuntu Linux. I loaded the following data:
@prefix mur: .
@prefix branda: .
@prefix brandb:…
I try a small python script to test my SPARQL request. However, just the next simple code doesn't work.
from SPARQLWrapper import SPARQLWrapper, JSON
import rdflib
#connect to the sparql point
sparql =…
I have created a SAIL object using tinkerpop blueprints to load RDF data into a Graph database. Ive successfully managed to load the data. The Graph database in question does not have a sparql endpoint to run my query mix test driver. Does anyone…