https://github.com/bespoyasov/text-generator
A naive text generator built in JavaScript using Markov chains.
https://github.com/bespoyasov/text-generator
code-generation javascript markov-chain text-generation web-worker
Last synced: 3 months ago
JSON representation
A naive text generator built in JavaScript using Markov chains.
- Host: GitHub
- URL: https://github.com/bespoyasov/text-generator
- Owner: bespoyasov
- Created: 2021-11-20T17:18:58.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-25T14:14:42.000Z (9 months ago)
- Last Synced: 2025-05-04T08:36:51.792Z (5 months ago)
- Topics: code-generation, javascript, markov-chain, text-generation, web-worker
- Language: JavaScript
- Homepage: http://bespoyasov.me/showcase/text-generator/browser/
- Size: 13.7 KB
- Stars: 25
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Text Generator ๐
Generates a random yet syntactically plausible-ish and meaningful-ish text using Markov chains and a bit of luck. Sometimes outputs โwise thoughtsโโข
## Try Yourself! ๐จโ๐ป
Open the [app](https://bespoyasov.ru/showcase/text-generator/browser/) in the browser and upload a .txt file with a text that will be used as the source for word predictions. The more words this text contains the better, more than 100k is perfect.
## How it works ๐
The generator uses Markov chains to randomly choose a word based on previously generated words. More info about Markov chains, how text generation works, and how to create one of these generators:
- ๐ท๐บ [In Russian](https://bespoyasov.ru/blog/text-generation-with-markov-chains/)
- ๐ฌ๐ง [In English](https://dev.to/bespoyasov/text-generation-with-markov-chains-in-javascript-i38)