Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eiri/mchain
Markov Chain Text Generator
https://github.com/eiri/mchain
cli generator golang markov-chain
Last synced: 28 days ago
JSON representation
Markov Chain Text Generator
- Host: GitHub
- URL: https://github.com/eiri/mchain
- Owner: eiri
- License: mit
- Created: 2017-10-04T03:45:09.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-04T04:00:43.000Z (about 7 years ago)
- Last Synced: 2024-06-20T10:18:52.078Z (5 months ago)
- Topics: cli, generator, golang, markov-chain
- Language: Go
- Size: 3.91 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Markov Chain Text Generator
## Summary
Basic implementation of [Markov chain](https://en.wikipedia.org/wiki/Markov_chain) text generator. Bit on a sloppy side, but I needed something quick to generate bunch of dummy text for makeup and layout, so here we are.
## Installation
```bash
$ go get github.com/eiri/mchain
$ go install
```## Usage
```
$ mchain -h
Usage of mchain:
-count int
number of words to generate (default 25)
-input string
path to source text$ mchain --input ~/Downloads/samples/rrc.txt --count 120
When this kidnapping idea struck us. It was, as Bill was, and as good a runner
as I am, he was a fire burning behind the big rock at the rising of the
external outward surface of Alabama that lay exposed to my view. "Perhaps,"
says I to myself, "it has not yet been discovered that the wolves have borne
away the tender lambkin from the box under the tree, got the knife away from
the boy amused and quiet till I tell you. About two miles from Summit was a
sling that Red Chief had said I could about how the kidnapping had been
kidnapped and chained to a bed in Bedlam. Besides being a thorough gentleman,
I think can.
```## Licence
[MIT](https://github.com/eiri/mchain/blob/master/LICENSE)