How to Extract Data from Wikipedia and Wikidata
linktosheets.com
linktosheets.com
RDF triple stores were the latest hype during Semantic Web era. Wouldn't a more general NoSQL/Graph or SQL database be suitable as well, if soneone wrote an import script. I read someone achieved in with MySQL and a star table schema.
What database software is WikiData using? WikiMedia properties usually use MySQL. From the dumps page they have SQL files as well, so probably MySQL. But they promote just the JSON, RDF and XML dumps.
Modern and simple to get started.
https://www.mpi-inf.mpg.de/departments/databases-and-informa...
https://gate.d5.mpi-inf.mpg.de/webyago3spotlx/SvgBrowser
(Disclaimer: colleague of a YAGO developer.)
Unprincipled, yes.
The mainsnaks snytax is a bit confusing but once you get used to it it's quite powerful. I use it quite often.
https://www.mediawiki.org/wiki/Alternative_parsers
It was for a web app that I made as a way to learn web dev. The data extraction from Wikipedia was what really killed my motivation and eventually left the project in a sort of amateurish, half-finished state. But, if any language learners wants to practice reading difficult English texts it might be somewhat useful:
https://www.mediawiki.org/wiki/Parsoid
If I were parsing lots of MediaWiki wikitext, I'd put Parsoid at the top of the list as the rest seem incomplete or unsupported.
https://dumps.wikimedia.org/other/cirrussearch/current/
These dumps contain a json line per article and are formatted roughly like so: https://en.wikipedia.org/wiki/Hacker_News?action=cirrusdump
Did you try just asking them? I'm sure someone there can flick a switch and get it all to you. After all, it's just text, and they must have it all set up to serve however they want.
The total size of the English Wikipedia is under 100 GB as uncompressed xml[1] (bearing in mind that xml is pretty verbose).
This should not be prohibitive for a Wikipedia admin to generate and to serve to you at your request. Why not?
It's a community project sponsored by donations.
[1] Eyeballing the trend on this page - https://en.wikipedia.org/wiki/Wikipedia:Size_of_Wikipedia which mentions "As of May 2015, the current version of the English Wikipedia article / template / redirect text was about 51 GB uncompressed in XML format", so I estimate based on the shape of the graph that it is less than 100 GB today.
Partial solutions are perhaps all we can hope for, given how hopelessly intermingled semantics and presentation are in the Wikitext format. If you had a completely accurate reimplementation of MediaWiki and all its templates and extensions, what you'd get in the end is HTML pages, and that's not actually data extraction.
Here's my project [1], which uses Haskell's Attoparsec library to get at the parts of Wikimedia content that I care about. Currently it extracts plain text from Wikipedia articles, and word relationships from three languages of Wiktionary.
Here's the link to it, may someone need to do something similar: https://github.com/joaoventura/WikiCorpusExtractor
I know there is Gozim - http://scaleway.nobugware.com - but that serves a local website.