Hi Sandra,

    There are different ways to get the RDF.
1. You could download the individueel rdf files, use an RDF converter tool
like redland rapper [1] to convert the rdf downloads to a format like
turtle which would allow concatenation of all the different download into
one.

2. Use construct queries.
 You could extract them with a construct query from the sparql endpoint of
Wikidata at (http://query.wikidata.org). The following query for example
extracts the triples on two WD items (Q5803847 Q20051232)

PREFIX wd: <http://www.wikidata.org/entity/>

CONSTRUCT {?wdid ?p ?o .}
WHERE {
  VALUES ?wdid {wd:Q5803847 wd:Q20051232 }
  ?wdid ?p ?o .
}

This leads to the following results [2]

[3] Use a program language with a SPARQL library. I use python which has a
library  called sparqlwrapper (https://rdflib.github.io/sparqlwrapper/).
This allows programmatic iteration of SPARQL results.

I hope this helps a bit?

Kind regards,

Andra Waagmeester



[1] http://librdf.org/raptor/rapper.html
[2]
https://query.wikidata.org/#PREFIX%20wd%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2F%3E%20%0A%0ACONSTRUCT%20%7B%3Fwdid%20%3Fp%20%3Fo%20.%7D%0AWHERE%20%7B%0A%20%20VALUES%20%3Fwdid%20%7Bwd%3AQ5803847%20wd%3AQ20051232%20%7D%0A%20%20%3Fwdid%20%3Fp%20%3Fo%20.%0A%7D
[3] https://rdflib.github.io/sparqlwrapper/



On Mon, Oct 26, 2015 at 5:11 PM, Sandra Fauconnier <
[email protected]> wrote:

> Hi all,
>
> For this Flemish museums on Wikidata project
> <https://www.wikidata.org/wiki/Wikidata:Flemish_art_collections,_Wikidata_and_Linked_Open_Data>
>  (
> … we hope to import some 30,000 Flemish artworks in the upcoming months :-)
> … ) I and the rest of the project team are trying to find out if and how
> we’ll be able to retrieve RDF from Wikidata - one RDF export/file for all
> concerned items at once.
>
> So this is not RDF for a single item (like this
> <https://www.wikidata.org/wiki/Special:EntityData/Q21012032.rdf>) and
> also not a RDF dump of all of Wikidata like mentioned here
> <https://www.wikidata.org/wiki/Wikidata:Data_access#Access_to_dumps>. It
> would be an RDF file corresponding to the results of this WDQ query
> <http://tools.wmflabs.org/autolist/autolist1.html?q=CLAIM%5B195:1471477%5D%20OR%20CLAIM%5B195:2365880%5D%20OR%20CLAIM%5B195:1948674%5D%20OR%20CLAIM%5B195:1928672%5D%20OR%20CLAIM%5B195:1540707%5D%20OR%20CLAIM%5B195:1573755%5D%20OR%20CLAIM%5B195:2098074%5D>
>  (which
> should produce more than 30,000 items in a few months!).
>
> Any tips on how to achieve this? Wikidata Toolkit? But how/what to do? We
> are not programmers/developers but we do have some budget to hire someone
> to build us something, so pointers to a (Belgian??) developer who could
> help would also be very welcome.
>
> The project raises quite a few questions, by the way, so I might come back
> with more :-)
>
> Many thanks in advance! Sandra (User:Spinster)
>
> _______________________________________________
> Wikidata mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikidata
>
>
_______________________________________________
Wikidata mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata

Reply via email to