Ask HN: Has anyone had luck using the Wikipedia data dumps?
Many docs and tutorials are from 10+ years ago. Have you had any luck loading the data dumps (not the API) locally in order to play around with them? if yes, I'd very much appreciate it if you could point me in the right direction.
13 comments
[ 2.3 ms ] story [ 45.2 ms ] thread[1] https://dumps.wikimedia.org/enwiki/20190301/
[2] https://mwparserfromhell.readthedocs.io/en/latest/
It took a bit to get accustomed to the format, but after looking at the files and doing a bit of research on the documentation, using Python with lxml made it relatively straightforward to do what I was interested in.
I'd recommend doing the same, only because it worked for me: get the XML dump, manually check out some files to understand what is going on, search for documentation on the file format and maybe read a few blog posts, and then convert the XML files to data structures suited for what you're interested in.
For actually ingesting the archives, dignifiedquire expanded a Rust utility aptly named Zim, which you can find here https://github.com/dignifiedquire/zim
Both repos contain information (and code of course) on how to extract information from the Zim archives
And I've changed it a little bit to extract only the first n characters, this might be of some use since wikipedia dump are supposed to be pretty large: https://github.com/mooss/ruskea/blob/master/make_wiki_corpus... .
===
===