{"id":13624683,"url":"https://github.com/daveshap/PlainTextWikipedia","last_synced_at":"2025-04-16T01:31:52.065Z","repository":{"id":52670043,"uuid":"315756680","full_name":"daveshap/PlainTextWikipedia","owner":"daveshap","description":"Convert Wikipedia database dumps into plaintext files","archived":true,"fork":false,"pushed_at":"2021-05-23T14:20:07.000Z","size":2024,"stargazers_count":301,"open_issues_count":4,"forks_count":41,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-08-01T22:01:58.240Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daveshap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-24T21:28:42.000Z","updated_at":"2024-06-20T11:12:14.000Z","dependencies_parsed_at":"2022-08-22T03:21:32.937Z","dependency_job_id":null,"html_url":"https://github.com/daveshap/PlainTextWikipedia","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daveshap%2FPlainTextWikipedia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daveshap%2FPlainTextWikipedia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daveshap%2FPlainTextWikipedia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daveshap%2FPlainTextWikipedia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daveshap","download_url":"https://codeload.github.com/daveshap/PlainTextWikipedia/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223691724,"owners_count":17186872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T21:01:45.162Z","updated_at":"2024-11-08T13:30:58.161Z","avatar_url":"https://github.com/daveshap.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# PlainTextWikipedia\n\nConvert Wikipedia database dumps into plain text files (JSON). This can parse literally all of Wikipedia with pretty high fidelity. There's a copy available on [Kaggle Datasets](https://www.kaggle.com/ltcmdrdata/plain-text-wikipedia-202011)\n\n\n## QUICK START\n\n1. Download and unzip a Wikipedia dump (see Data Sources below) make sure you get a monolithic XML file\n2. Open up `wiki_to_text.py` and edit the filename to point at your XML file. Also update the savedir location\n3. Run `wiki_to_text.py` - it should take about 2.5 days to run, with some variation based on your CPU and storage speed\n\n\n## Data Sources\n\nThere are two primary data sources you'll want to use. See the table below for the root url. \n\n| Name | Description | Link |\n|---|---|---|\n| Simplified English Wikipedia | This is only about 1GB and therefore is a great test set | [https://dumps.wikimedia.org/simplewiki/](https://dumps.wikimedia.org/simplewiki/) |\n| English Wikipedia | This is all of Wikipedia, so about 80GB unpacked | [https://dumps.wikimedia.org/enwiki/](https://dumps.wikimedia.org/enwiki/)\n\nNavigate into the latest dump. You're likley looking for the very first file in the download section. They will look something like this:\n\n- `enwiki-20210401-pages-articles-multistream.xml.bz2 18.1 GB`\n- `simplewiki-20210401-pages-articles-multistream.xml.bz2 203.5 MB`\n\nDownload and extract these to a storage directory. I usually shorten the folder name and filename. \n\n\n## Legal\n\nhttps://en.wikipedia.org/wiki/Wikipedia:Reusing_Wikipedia_content\n\nWikipedia is published under [Creative Commons Attribution Share-Alike license (CC-BY-SA)](https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License). \n\nMy script is published under the MIT license but this does not confer the same privileges to the material you convert with it. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaveshap%2FPlainTextWikipedia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaveshap%2FPlainTextWikipedia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaveshap%2FPlainTextWikipedia/lists"}