How to try it:
- Enter a SPARQL query in the first textbox.
- Optional: Enter an OWL ontology in the second textbox
- Enter the path to an N-Triples file into the third textbox.
-
Click on the
Convert to bash script
button -
Copy the content of the "Bash script" textbox into a file named
query.sh
in the folder with the .tsv files (or click onDownload script
) -
Run it with
bash query.sh
tmp
for temporary files and removes its contents afterwards
API
You can also use bashlog from the command line, without a browser. For details, see API.Examples:
You can try the examples on this dataset (source).- Find people that died in the city where they were born
BASE <http://yago-knowledge.org/resource/> SELECT ?X WHERE { ?X <wasBornIn> ?Y. ?X <diedIn> ?Y. }
- Living people
BASE <http://yago-knowledge.org/resource/> SELECT ?X WHERE { { ?X <wasBornIn> []. } UNION { ?X <wasBornOnDate> []. } MINUS { ?X <diedIn> []. } MINUS { ?X <diedOnDate> []. } }
- All people
BASE <http://yago-knowledge.org/resource/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?X WHERE { ?X rdf:type/rdfs:subClassOf* <wordnet_person_100007846>. }
- Facts in the query
SPARQL
BASE <http://yago-knowledge.org/resource/> SELECT ?X WHERE { ?X <type>
. } OWL
@prefix kb: <http://yago-knowledge.org/resource/> . kb:albert kb:type kb:person. kb:marie kb:type kb:person.