Christopher added a comment.

Yes.  It seems I need to disable the 10 minute query timeout set here first: 
https://github.com/wikimedia/wikidata-query-rdf/blob/b3e646284f0b74131bce99a1b7d5fc6bfe675ec1/war/src/config/web.xml#L55

A fat query like this:

  PREFIX wikibase: <http://wikiba.se/ontology#>
  PREFIX prov: <http://www.w3.org/ns/prov#>
  
  SELECT (count(distinct(?wds)) AS ?scount) WHERE {
         ?wds ?p wikibase:Statement .
     OPTIONAL {
       ?wds1 <http://www.w3.org/ns/prov#wasDerivedFrom> ?o .
       FILTER (?wds1 = ?wds) .
    }
    FILTER (!bound(?wds1)) .
  } 

to find out how many statements do not have references is currently not 
possible.

There may be a better way to ask for this, but the way that the data is coded 
does not really facilitate type joins.   An important point is that 
wikidata-todo/stats, and possibly the standing perception of the data, assumes 
an iterable hierarchy.  But RDF does not make hierarchy.  So an Item does not 
"contain" statements, and statements do not "contain" references.

The relationship between statements and references is difficult to query by 
type, because a binding triple looks like this:

  wd:statement/Q20913766-CD281698-E1D0-43A1-BEEA-E2A60E5A88F1 
prov:wasDerivedFrom       wdref:39f3ce979f9d84a0ebf09abe1702bf22326695e9

Note that simply counting the frequency of 
http://www.w3.org/ns/prov#wasDerivedFrom and comparing that to the frequency of 
wikibase:Statement would provide a kind of global ratio that is a fast and easy 
alternative to counting individual statements without references.

I am rebuilding wdm-rdf now with the new Munger and no query timeout.

Also, I will load the dump from 17 November, so that the updater has some 
chance to sync.  It had fallen back to 14 days old, and I doubt that it would 
ever have caught up.


TASK DETAIL
  https://phabricator.wikimedia.org/T117234

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Christopher
Cc: Lydia_Pintscher, StudiesWorld, Addshore, Christopher, Aklapper, 
Wikidata-bugs, aude, Mbch331



_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to