Hi all, after a tweet from Magnus [0] we talked a bit about entries without statements (about 2.5M) and on the question if SPARQL could list all entries in Wikidata that do not have statements. I played a bit with combinations of OPTIONAL and FILTER-BOUND and FILTER NOT EXIST... something like:
PREFIX wikibase: <http://wikiba.se/ontology#> SELECT DISTINCT ?entry ?label ?statement WHERE { ?entry rdfs:label ?label . FILTER (lang(?label) = "en") FILTER NOT EXISTS { ?statement ?prop ?entry ; wikibase:rank ?rank . } } LIMIT 5 These queries tend to fail. Now, I'm not at all a SPARQL wizard and maybe there is a simple way to not run into the time outs that I do now. But there was something else I noted... statements are not typed... that would probably kick in some index, rather than the above query, and the documentation actually speaks about wikibase:Statement [1] but if I search for anything rdf:type-d as such, then it finds nothing in the SPARQL end point: https://query.wikidata.org/#PREFIX%20wikibase%3A%20%3Chttp%3A%2F%2Fwikiba.se%2Fontology%23%3E%0Aselect%20%3Fstat%20where%20%7B%0A%20%20%3Fstat%20%3Fpred%20wikibase%3AStatement%0A%7D%20limit%205 Did this typing get lost at some point or is the documentation outdated? Greetings, Egon 0.https://twitter.com/MagnusManske/status/685499058228715520 1.https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format#Statement_types -- E.L. Willighagen Department of Bioinformatics - BiGCaT Maastricht University (http://www.bigcat.unimaas.nl/) Homepage: http://egonw.github.com/ LinkedIn: http://se.linkedin.com/in/egonw Blog: http://chem-bla-ics.blogspot.com/ PubList: http://www.citeulike.org/user/egonw/tag/papers ORCID: 0000-0001-7542-0286 ImpactStory: https://impactstory.org/EgonWillighagen _______________________________________________ Wikidata mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata
