Improve text generation

This commit is contained in:
arne 2024-01-06 10:50:31 +01:00
commit a3e2ef331f
2 changed files with 39 additions and 28 deletions

View file

@ -6,24 +6,21 @@ František Kafka is a bot that generates text using Markov chains. It is online
## Installation
You need your input text in plain text; [Project Gutenberg](https://www.gutenberg.org) is a good source for that. Make sure to remove all parts of the text that are not to be used as the bot's corpus.<sup>1</sup>
You will also need an access token, so register your app at a mastodon instance of choice to get one. Copy the `.env.example` to `.env` and edit it to set up the environment correctly.
Building an running the Clojure code requires [leiningen](https://leiningen.org/) version 2.8 or above.
You need your input text in plain text; [Project Gutenberg](https://www.gutenberg.org) is a good source for that. Make sure to remove all parts of the text that are not to be used as the bot's corpus.
You will also need an access token, so register your app at a mastodon instance of choice to get one.
1: This means removing the copyright notice, which is the reason why there is no text included in this repository.
Building an running the Clojure code requires [babashka](https://babashka.org/), version 1.3 is tested and should work.
## Usage
```
# build it and run it
$ lein uberjar
$ java -jar target/uberjar/heyarne.frantisek-kafka-0.1.0-standalone.jar [args]
$ bb -m heyarne.frantisek-kafka.samsa --interval=5 --order=3 resources/kafka-en.txt
```
## Options
```
$ lein run -- --help
$ bb -m heyarne.frantisek-kafka.samsa --help
František Kafka is a Markov chain bot that infinitely generates text
from one or more text files. botsin.space/@frantisek hosts a live
version of it that generates an infinite version of Franz Kafka's Metamorphosis.