https://github.com/benediktwerner/wikilinkanalyzer
Find the shortest way from one Wikipedia page to another
https://github.com/benediktwerner/wikilinkanalyzer
Last synced: about 2 months ago
JSON representation
Find the shortest way from one Wikipedia page to another
- Host: GitHub
- URL: https://github.com/benediktwerner/wikilinkanalyzer
- Owner: benediktwerner
- Created: 2019-03-23T13:51:10.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-06T21:34:34.000Z (almost 3 years ago)
- Last Synced: 2025-03-05T22:46:02.852Z (2 months ago)
- Language: Rust
- Homepage:
- Size: 29.3 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wikipedia link-chain analyzer
This is a program to find the shortest link chains between two wikipedia pages.It can also be used to find pages that need the longest link-chains to a given page and more.
## Building and Installing
Building and installing requires a [Rust Installation](https://www.rust-lang.org/).To install:
```
$ git clone https://github.com/benediktwerner/WikiLinkAnalyzer
$ cargo install --path WikiLinkAnalyzer
$ wiki-analyzer --version
```To build:
```
$ git clone https://github.com/benediktwerner/WikiLinkAnalyzer
$ cd WikiLinkAnalyzer
$ cargo build
$ ./target/debug/wiki-analyzer
```## Setup
- Goto
- Choose a wiki e.g. "enwiki" for English Wikipedia or "dewiki" for German Wikipedia
- Download the table dumps for the tables `page`, `pagelinks` and `redirect` as `.sql.gz` archives
- Place them in the `data` directory (relative to the directory you run the command in)
- The analyzer will automatically extract and preprocess these files on the first run## Debugging tips
You can use the Wikipedia API to find an article from it's ID: .Table documentations:
- [Page](https://www.mediawiki.org/wiki/Manual:Page_table)
- [Pagelinks](https://www.mediawiki.org/wiki/Manual:Pagelinks_table)
- [Redirect](https://www.mediawiki.org/wiki/Manual:Redirect_table)