Ask HN: Has anyone had luck using the Wikipedia data dumps?
1–10 of 14 posts
Re: Ask HN: Has anyone had luck using the Wikipedia data dumps?
#2Re: Ask HN: Has anyone had luck using the Wikipedia data dumps?
#3Re: Ask HN: Has anyone had luck using the Wikipedia data dumps?
#4Re: Ask HN: Has anyone had luck using the Wikipedia data dumps?
#5Re: Ask HN: Has anyone had luck using the Wikipedia data dumps?
#6I also didn't find much information about how long it would take to import into a db, so I used the xml dumps directly [1]. I only needed the wiki content (not the history), so the article xml files worked well for me. And then I used mwparserfromhell [2] to parse and extract from the wiki markup. [1] https://dumps.wikimedia.org/enwiki/20190301/ [2] https://mwparserfromhell.readthedocs.io/en/latest/
Re: Ask HN: Has anyone had luck using the Wikipedia data dumps?
#7It 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.
Re: Ask HN: Has anyone had luck using the Wikipedia data dumps?
#8Re: Ask HN: Has anyone had luck using the Wikipedia data dumps?
#9For 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
Re: Ask HN: Has anyone had luck using the Wikipedia data dumps?
#10And 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... .