{"id":16572794,"url":"https://github.com/lemire/indexwikipedia","last_synced_at":"2025-10-29T02:30:17.558Z","repository":{"id":8918201,"uuid":"10645359","full_name":"lemire/IndexWikipedia","owner":"lemire","description":"A simple utility to index wikipedia dumps using Lucene.","archived":false,"fork":false,"pushed_at":"2020-10-13T04:15:20.000Z","size":41,"stargazers_count":21,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-01T21:11:10.838Z","etag":null,"topics":["java","lucene","wikipedia-dump"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lemire.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":"2013-06-12T15:04:06.000Z","updated_at":"2023-02-04T13:59:11.000Z","dependencies_parsed_at":"2022-08-30T14:11:46.756Z","dependency_job_id":null,"html_url":"https://github.com/lemire/IndexWikipedia","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemire%2FIndexWikipedia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemire%2FIndexWikipedia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemire%2FIndexWikipedia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemire%2FIndexWikipedia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lemire","download_url":"https://codeload.github.com/lemire/IndexWikipedia/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238758247,"owners_count":19525735,"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":["java","lucene","wikipedia-dump"],"created_at":"2024-10-11T21:28:35.879Z","updated_at":"2025-10-29T02:30:16.993Z","avatar_url":"https://github.com/lemire.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"IndexWikipedia\n==============\n\nA simple utility to index wikipedia dumps using Lucene.\n\nThis tool can be used to quickly create an index. It is then expected that a programmer will\nwrite some code to use the index. This project does not aim to build an end-user index.\n\nIt is useful as part of research projects.\n\n## Usage:\n\n* install java (JDK) if needed\n* install maven if needed\n* [grap your wikipedia dump](http://en.wikipedia.org/wiki/Wikipedia:Database_download): you might be grab quickly part of the dump by typing a command like ``wget https://dumps.wikimedia.org/enwiki/latest/enwiki-latest-pages-articles10.xml-p2336425p3046511.bz2``. (Sorry the database dumps are not at a fixed location so we cannot provide a precise URI.) Be mindful that there are many types of Wikipedia dumps and not all of them contain the articles: when in doubt, read the documentation.\n* ```mvn compile```\n* Create a directory where your index will reside, such as ``WikipediaIndex``. E.g., you might be able to type ``mkdir WikipediaIndex``. Be mindful not to reuse the same directory for different projects or different Lucene versions.\n* ```mvn exec:java -Dexec.args=\"yourdump someoutputdirectory```\n\nActual example:\n\n```\ngit clone https://github.com/lemire/IndexWikipedia.git\ncd IndexWikipedia\nwget https://dumps.wikimedia.org/enwiki/latest/enwiki-latest-pages-articles10.xml-p2336425p3046511.bz2\nmkdir Index\nmvn compile\nmvn exec:java -Dexec.args=\"enwiki-latest-pages-articles10.xml-p2336425p3046511.bz2 Index\"\n```\nNote that this precise example may fail unless you adjust the URI https://dumps.wikimedia.org/enwiki/latest/enwiki-latest-pages-articles10.xml-p2336425p3046511.bz2 since Wikipedia dumps are not guaranteed to stay at the same URI.\n\n\nThe documents have ``title``, ``name``, ``docid`` and ``body`` fields, all of which are stored with the index.\n\nTo see how you might then query the index, see the class file 'Query.java' for a working example.\n\nExtracting word-frequency pairs\n-------------------------------\n\nThere is also a poorly named utility to extract all word-frequency pairs called ``me.lemire.lucene.CreateFreqSortedDictionary``. Deliberately, it is currently undocumented.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemire%2Findexwikipedia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flemire%2Findexwikipedia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemire%2Findexwikipedia/lists"}