Questions tagged [sparqlwrapper]

SPARQL Wrapper is a SPARQL Endpoint interface to Python

SPARQLWrapper is a SPARQL Endpoint interface to Python

158 questions
0
votes
2 answers

python SPARQLWrapper return only 10000 results

I use the SPARQLWrapper module to launch a query to a virtuoso endpoint and get the result. The query always return a maximum of 10000 results Here is the python script: from SPARQLWrapper import SPARQLWrapper, JSON queryString = """ SELECT…
John Doe
  • 354
  • 2
  • 10
0
votes
0 answers

SPARQL and DBPedia, different redirect results in python to sparql endpoint

I'm using the following query to get the link / URI to the correct titled resource given an incorrect title: PREFIX rdfs: PREFIX dbo: SELECT ?redirectsTo WHERE { ?x rdfs:label…
imattacus
  • 354
  • 1
  • 3
  • 12
0
votes
1 answer

How to find actors in a specific movie using a dbpedia query in python

I have the following code already: movie = "http://dbpedia.org/resource/Cannes_Man" Q = "PREFIX dbo: PREFIX dbpedia: SELECT ?actor WHERE {?actor dbo:starring <"+movie+">.} " sparql =…
pacubs92
  • 1
  • 1
0
votes
1 answer

SPARQL Subquery Graph Name

I have following SPARQL query that contains a sub-select. The data contains multiple graphs and I want to know what graph the values for ?b and ?m come from: select ?b, ?m, ?g1 where { { select ?o1, ?o2, ?e where{ graph ?g{ …
Beautiful Mind
  • 5,828
  • 4
  • 23
  • 42
0
votes
1 answer

Can I use SPARQLwrapper with a local copy of DBPedia?

The examples in the documentation suggest that I set the SPARQL endpoint in the following way: sparql = SPARQLWrapper("http://dbpedia.org/sparql") Is there any way I can use SPARQLwrapper to search through a local copy of DBPedia rdf dataset?
0
votes
0 answers

How to get data property from dbpedia?

I am trying to use SPARQL to query data on Manchester United FC wikipedia page using dbpedia (which can be found here [http://dbpedia.org/page/Manchester_United_F.C.]). I have successfully accessed dbo and dbp properties but I can't seem to access…
umairaslam
  • 367
  • 3
  • 22
0
votes
0 answers

Querying issue with SPARQLWrapper

I am pretty new with SPARQL query using python package SPARQLWrapper. I was trying to retrieve the results from the DBpedia using following query: PREFIX rdfs: PREFIX type:…
David
  • 33
  • 1
  • 2
  • 9
0
votes
1 answer

How to INSERT all triples from an RDFlib graph into another repository without iterating through every triple?

This question is related to What URI to use for a Sesame repository while executing a SPARQL ADD query. I'm trying to INSERT all triples from a Sesame repository into another (Dydra). There are a couple of ways to do it, such as using SERVICE clause…
kurious
  • 1,024
  • 10
  • 29
0
votes
2 answers

How can I convert SPARQL query into JSON format?

This is my code #!/usr/bin/python # -*- coding: utf-8 -*- import requests from requests.auth import HTTPBasicAuth from abc import ABCMeta, abstractmethod class PPTSparqlClient: """Minimal Class to access PPT SparqlEndpoints""" def…
Kushal Shah
  • 165
  • 1
  • 13
0
votes
1 answer

Sparql query JSON error from BNCF endpoint

I'm trying to retrieve results from the BNCF at this endpoint. My query (with "ab" as example) is: PREFIX skos: SELECT DISTINCT ?source ?label ?content WHERE { ?source a…
Gio Bact
  • 541
  • 1
  • 7
  • 23
0
votes
1 answer

Sparql query on DbPedia return not repeated objects

I'm trying to execute this Sparql query on the DBPedia but it seems to ignore the DISTINCT: SELECT DISTINCT ?source ?title ?content ?topic WHERE { ?source rdfs:label ?title ; …
Gio Bact
  • 541
  • 1
  • 7
  • 23
0
votes
1 answer

SPARQL how to deal with different cased queries?

I am still a bit new to SPARQL. I have set up a dbpedia endpoint for our company. I have no idea what the end user will be querying and, since DBpedia is case sensitive I pass both title case & uppercase versions for subjects vs something like a…
user_78361084
  • 3,538
  • 22
  • 85
  • 147
0
votes
1 answer

How to get the value of a resource which is a property of another resource in sparql query

how can get the value name of the capital city not the URI from this query SELECT ?capital WHERE { ?capital} In the above query I am getting the URI of the capital of…
user3335188
  • 99
  • 1
  • 6
0
votes
1 answer

Python SPARQLWrapper freeze

I developed some tests in python using SPARQLWrapper which generate some queries and execute these queries through SPARQLWrapper with an huge number of SPARQL endpoints. Some of these queries are quite complex and they trigger the timeout of the…
Fabio Benedetti
  • 317
  • 2
  • 12
0
votes
1 answer

Sparql query bad formed

I'm trying to build a sparql query based on a list of properties but I get an error saying that the query is bad formed. The problem is I don't know what to do to fix it. This is the function: def create_query(dbpedia_uri, props): #props are…
Rod0n
  • 1,019
  • 2
  • 14
  • 33
1 2 3
10
11