WikipediaQL: Query language for efficient data extraction from Wikipedia (early
github.com
github.com
I am mentioning Wikidata/SPARQL in README (TL;DR: less data still, harder to discover unless you are deeply into SemWeb tech), but I expect this project, will it live long (fingers crossed) will definitely has some relations with Wikidata, too. My previous attempt on something similar: https://github.com/molybdenum-99/reality — used both Wikipedia and Wikidata (and OpenStreetMap and...) but however cool were few demos I managed too achieve, it was a dead end for several reasons.
If you ever tried to scrape HTML, you know how untidy it usually ends up; this one looks clean.
Though, I should say that I am still not sure GraphQL's mental model would work here (WikipediaQL for now structured around "which part of the document to choose and how to transform it", with "where to put it" being the final statement just of some branches; with GraphQL, as far as I can understand, each node is "where to put it"-first, and it _may_ lead to clumsy and repetitive queries).
That would be really useful.
You can get a lot of data from Wikidata. They have a SPARQL interface at https://query.wikidata.org/#%23Humans%20born%20in%20New%20Yo... and you can also get all the data in a variety of rdf formats.
In more details:
1. With the current library, you can't (connection to en.wikipedia.org is hardcoded :shrug:)
2. Adding "what MediaWiki instance to connect" is relatively easy (they all have the same API), including Wiktionary
3. For Wiktionary, current (v. 0.0.2) selectors will be useful, but future ones (infobox, wikitable and other high-level Wikipedia-specific stuff) will be not
4. So I might think of some way of specifying "set of selectors relevant for this instance" or something like that.
5. So, in some distance future, Wiktionary definitely would be fully supported; how distant—probably depends on how fast the project will be moving forward, and how it will be (hopefully) used by others
6. But I might add a support for "use this instance of MediaWiki" in the near future, it is easy!