Created
April 22, 2016 11:29
-
-
Save albertmeronyo/5c49bc3a6f994aee35aeabe9e606af3d to your computer and use it in GitHub Desktop.
Example SPARQL queries for https://github.com/mhbeals/scissorsandpaste
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Count triples | |
SELECT COUNT(*) FROM <http://www.scissorsandpaste.net/sapcorpus#> WHERE {?s ?p ?o} | |
# Describe a resource | |
PREFIX sapcorpus: <http://www.scissorsandpaste.net/sapcorpus#> | |
DESCRIBE sapcorpus:newspaper_lt | |
# Document article bodies | |
PREFIX sap: <http://www.scissorsandpaste.net/sapont#> | |
SELECT ?body | |
FROM <http://www.scissorsandpaste.net/sapcorpus#> | |
WHERE { | |
?document a foaf:Document ; | |
sap:body ?body . | |
} LIMIT 10 | |
# Articles before 1800 | |
PREFIX fabio: <http://purl.org/spar/fabio/> | |
PREFIX dc: <http://purl.org/dc/terms/> | |
SELECT * | |
FROM <http://www.scissorsandpaste.net/sapcorpus#> | |
WHERE { | |
?article a fabio:NewspaperArticle ; | |
dc:date ?date . | |
FILTER (?date < "1800-01-01"^^xsd:date) | |
} LIMIT 10 | |
# Headings of documents transcribed after 2015 | |
PREFIX sap: <http://www.scissorsandpaste.net/sapont#> | |
SELECT * | |
FROM <http://www.scissorsandpaste.net/sapcorpus#> | |
WHERE { | |
?document a foaf:Document ; | |
sap:heading ?heading ; | |
sap:transcribedOn ?date . | |
FILTER (?date > "2015-01-01"^^xsd:date) | |
} LIMIT 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment