Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aajanki/markovtextweb
Web server that generates random text using Markov chains
https://github.com/aajanki/markovtextweb
Last synced: about 2 months ago
JSON representation
Web server that generates random text using Markov chains
- Host: GitHub
- URL: https://github.com/aajanki/markovtextweb
- Owner: aajanki
- License: mit
- Created: 2014-08-02T08:23:10.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-02T08:24:00.000Z (over 10 years ago)
- Last Synced: 2024-04-25T02:31:01.406Z (8 months ago)
- Language: Python
- Size: 109 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# markovtextweb
Web server that generates random text using Markov chains.
The Markov chain is learned from posts in a Wordpress blog.
## Prerequisites
You will need [Leiningen][1] 1.7.0 or above and [Python][2] 2.7 or
above installed.[1]: https://github.com/technomancy/leiningen
[2]: https://www.python.org/## Preprocessing Wordpress input text
Export your Wordpress blog contents into a WordPress eXtended RSS
file. Let's assume that the file is called wordpress.xml.Generate tokens for the Wordpress export file:
tokenizer/tokenizer.sh path/to/wordpress.xml
This will create a file data/tokens that the server uses.
## Running
To start a web server for the application, run:
lein ring server
or
lein ring uberjar
java -jar target/markovtextweb-x.y.z-standalone.jarIf the tokens file is not in the default location data/tokens, specify
the path in the environment variable TOKENS_FILE.## License
MIT License
Copyright © 2014 Antti Ajanki