https://github.com/brianesimon/simple-markov
npm package for simple markov-based text generation
https://github.com/brianesimon/simple-markov
markov
Last synced: 6 months ago
JSON representation
npm package for simple markov-based text generation
- Host: GitHub
- URL: https://github.com/brianesimon/simple-markov
- Owner: BrianESimon
- License: mit
- Created: 2016-10-13T15:05:47.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-24T17:56:01.000Z (over 9 years ago)
- Last Synced: 2025-02-20T02:18:56.863Z (over 1 year ago)
- Topics: markov
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# simple-markov [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]
> Generate text using a Markov chain
## Installation
```sh
$ npm install --save simple-markov
```
## Usage
```js
var SimpleMarkov = require('simple-markov');
var markov = new SimpleMarkov(3, 'I really like markov chains. They make generating text very hilarious.');
markov.learn('We can keep making it learn, too.');
console.log(markov.generateText(100));
```
## License
MIT © [Brian Simon](https://github.com/bsssshhhhhhh)
[npm-image]: https://badge.fury.io/js/simple-markov.svg
[npm-url]: https://npmjs.org/package/simple-markov
[travis-image]: https://travis-ci.org/bsssshhhhhhh/simple-markov.svg?branch=master
[travis-url]: https://travis-ci.org/bsssshhhhhhh/simple-markov
[daviddm-image]: https://david-dm.org/bsssshhhhhhh/simple-markov.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/bsssshhhhhhh/simple-markov
[coveralls-image]: https://coveralls.io/repos/bsssshhhhhhh/simple-markov/badge.svg
[coveralls-url]: https://coveralls.io/r/bsssshhhhhhh/simple-markov