tetherless-world / whyis

Whyis is a nano-scale knowledge graph publishing, management, and analysis framework.
Apache License 2.0
52 stars 30 forks source link

A home for example SPARQL queries? #243

Open mdeagen opened 3 years ago

mdeagen commented 3 years ago

The Wikidata endpoint (https://query.wikidata.org/) has an Examples tab, with filtering based on the comment at the top of the query (written in natural language).

How can we store example SPARQL queries as metadata in a knowledge graph, such that those queries are accessible via search (assuming there is a commented description at the top of the query)? How could we make those example queries accessible to new users as FAQ/tutorials, and existing users as a way to procure datasets for further purposes such as chart-building? (While these would be curated, this could be a nice bridge to a natural-language-based interface...)

Example format:

#List all classes in the knowledge graph
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?class WHERE {
  ?thing rdf:type ?class .
}

FYI, the Wikidata endpoint also has a nice #defaultView: rendering that resembles the Pro offerings of Yasgui, such as map view of the output data...

mdeagen commented 3 years ago

Another note: To expand the list of examples, it may make sense to have an interface elements such as "Didn't find your question? Ask us here!" link where the question is sent to SPARQL expert(s) on the team who add the query to answer the question, and the reply is sent back to the user and added to the list of examples.