https://github.com/modestimpala/markov-rs
A markov chain generator in Rust
https://github.com/modestimpala/markov-rs
markov-chain
Last synced: 3 months ago
JSON representation
A markov chain generator in Rust
- Host: GitHub
- URL: https://github.com/modestimpala/markov-rs
- Owner: modestimpala
- Created: 2023-06-04T12:34:41.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-06T13:53:10.000Z (about 2 years ago)
- Last Synced: 2025-01-07T20:23:44.161Z (5 months ago)
- Topics: markov-chain
- Language: Rust
- Homepage:
- Size: 14 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Markov Text Generation with Rust
This Rust code implements a second-order Markov chain-based text generation algorithm, with weighted distribution. It allows you to generate random text based on the patterns observed in a given set of input texts.
## Requirements
- Rust/Cargo
- Tokio crate
- Rand crate## Usage
Clone the repository:
$ git clone https://github.com/modestimpala/markov-rs.git
Build and run the project:
$ cargo run
Enter the directory path containing the text files when prompted.
The program will process the text files and generate a Markov model based on their contents.
Enter the number of letters you want to generate.
The program will output the generated text.