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…
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…
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 =…
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{
…
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?
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…
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:…
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…
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…
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…
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 ;
…
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…
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…
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…
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…