6,227 questions
1
vote
0
answers
36
views
Get the raw string of a numeric Wikidata value with SPARQL
For example the following query returns only the value "57" but I need to get the original raw value stored as string ("+57.000").
select ?value (str(?value) as ?strValue) ?amount ...
0
votes
1
answer
71
views
Activating Basic Authentication in Virtuoso 7 Open Source for sparql-auth Endpoint
I am using a C# program to access a Virtuoso Sparql Endpoint (sparql-auth). I installed the latest version 7 of the Open Source edition. In my C# program, I use HttpClient with Basic Authentication. ...
1
vote
1
answer
83
views
How to measure the duration of update queries in Apache Jena Fuseki?
I am currently investigating Apache Jena Fuseki (latest release, version 5.6.0) for a project on Knowledge Graphs. Therefore, I got it running on a Docker container.
I want to measure the time of a ...
Advice
0
votes
1
replies
50
views
Sparql with comunica from Wikidata
SELECT ?item ?itemLabel
WHERE
{
?item wdt:P31 wd:Q146.
}
I have this query, taken from Wikidata as an example. I save it in a file query.sparql.
When I try to run the query from the console:
...
0
votes
1
answer
69
views
Limiting cardinality of predicates in SPARQL queries
I'm trying to create a query to match what we call the "shape" of a node in our rdf data. One of the things that goes into this shape is a cardinality for each type of predicate that can ...
0
votes
0
answers
71
views
I'd like to filter names by initials on Wikidata Query Service
I'm trying to find individuals on the Wikidata Query Service, and I'd like to filter results from certain initials (e.g. if a family name starts with "B" and at least one given name with &...
0
votes
0
answers
39
views
Wikidata SPARQL request fails with : Headless value factory should not be asked for its namespace
I have a SPARQL request that extracts various data for geographic locations from Wikidata:
SELECT DISTINCT ?h ?hLabel ?type ?location ?parent ?north ?south ?east ?west ?area
WHERE
{
VALUES (?h) {(wd:...
0
votes
1
answer
50
views
How to do a count() using jena SelectBuilder [closed]
I want to use QueryBuild to build a query with a count().
What I tried, and Chat GPT suggested, was to use buildDefaultSelectBuilder().addVar(count(..) as ..).
But that treats the count() as a var ?...
2
votes
0
answers
73
views
Why does this query timeout while this similar one does not?
I wanted to know for each president, in what state were they born, so I wrote this Wikidata query:
SELECT * WHERE {
# P31 = instance of
# Q5 = human (excludes fictional characters)
?president ...
1
vote
1
answer
46
views
Extracting DOIs from WikiData entries via Wikidata Query Service
I'm having trouble consistently retrieving DOIs for WikiData entries for scientific articles via the query service.
As a minimal working example, the following will return the DOI for the entry ...
1
vote
1
answer
98
views
Does RDFLib offer static/semantic validation for SPARQL (beyond parseQuery)?
parseQuery in RDFLib catches syntax errors, but I can not find a way to make RDFLib flag semantic/static issues (e.g., GROUP BY mismatches) before execution on a remote endpoint. translateQuery was ...
1
vote
0
answers
68
views
Multiple language labels in sparql query on wikidata
I want to query wikidata entities and their labels in multiple languages. But for some reason querying the labels is very inperformant.
My base query looks like this (find 3 life forms that have ...
0
votes
0
answers
35
views
SPARQL Query Pattern Isomorpher
I want to compare 2 SPARQL queries with each other, especially the query patterns in the WHERE clause. The huge problem is that there are multiple variants that have the same semantic meaning so I am ...
0
votes
0
answers
50
views
GROUP_CONCAT not concatenating?
I am learning how to make SPARQL requests to Wikidata.
I am trying to get a list of countries that:
speak English
are located in UTC from -8 to +2
with latest GDP Per Capita
With aggregated lists of ...
2
votes
1
answer
111
views
Searchstring to WikiData entity ID
Question
How do I get from an animal name (tiger) to its WikiData entity id (Q19939) in a static website?
Context
I am writing a small static website (no backend, just html and vanilla javascript) ...