Giter VIP home page Giter VIP logo

wiki-traverse's Introduction

Requirements

  • A redis server, I used Memurai because I'm on Windows, but you can just use redis if ur on Arch or something
  • Rust nightly toolchain (for now), feel free to make a PR that doesnt require the nightly feature flags im lazy though
  • Wiki dumps in SQL from any date (ungzipped), you need 3 tables: page, redirects, and pagelinks
    • If you want to skip the graph building, you can instead just use this redis dump I made from the 2023-04-01 wiki dumps
    • Also if you want to use this on thewikigame, I would use an older wiki dump (like ~2020), heres a redis dump I made from 2020-09-20

Setup

You can skip this if you're just using a prebuilt redis dump instead

  • Set the folder with your wiki dumps and the timestamp of the wiki dumps in the `.env file
  • Maybe edit the THREAD_COUNT const in the build module, I set it to how many cores I have and anything above that seemed to have the same or worse performance.
  • Run cargo run --release -- build this took me 40 minutes to do.

Usage examples

  • cargo run --release -- find Kangaroo Coca-Cola (~50ms)
  • cargo run --release -- find Quantum_Physics Carpenter_bee (~8s)
  • cargo run --release -- find Hairbrush Everhood (~400s)
  • pnpm start run websocket used in server/wikipedia.user.js (install npm dependencies first)

Todo

  • Maybe make the bfs optionally double-sides (optional cus its a bit more cheaty)

wiki-traverse's People

Contributors

vap0r1ze avatar

Stargazers

aidan avatar fawn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.