https://github.com/mdwheele/marky
Marky Markov and the Chamber of Secrets
https://github.com/mdwheele/marky
Last synced: about 1 year ago
JSON representation
Marky Markov and the Chamber of Secrets
- Host: GitHub
- URL: https://github.com/mdwheele/marky
- Owner: mdwheele
- License: mit
- Created: 2015-05-01T19:17:48.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2021-03-22T21:12:43.000Z (about 5 years ago)
- Last Synced: 2025-03-24T22:28:59.757Z (about 1 year ago)
- Language: PHP
- Size: 9.77 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# marky
Marky is a markov-chain based text generator... it will be a continuance of the work at http://www.haykranen.nl/2008/09/21/markov.
## Install
Via Composer
``` bash
$ composer require mdwheele/marky
```
## Usage
**From Raw Text**:
``` php
require_once('vendor/autoload.php');
use Marky\Marky;
// Strips new-lines, but that's it...
$marky = Marky::fromString('something long here is better');
echo $marky->generate(500);
```
**From a File**:
``` php
require_once('vendor/autoload.php');
use Marky\Marky;
$marky = Marky::fromFile('source.txt');
echo $marky->generate(500);
```
## Testing
``` bash
$ phpunit
```
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Security
If you discover any security related issues, please email mdwheele@gmail.com instead of using the issue tracker.
## Credits
- [Dustin Wheeler](https://github.com/mdwheele)
- [Hay Kranen](http://www.haykranen.nl/2008/09/21/markov)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.