Custom Corpus Text Generator
Hidden N-gram engine fed by your own pasted or uploaded text.
Tokens: 0
Unique words: 0
Generated Output
Hidden N-Gram Text Engine
This generator runs entirely in your browser. It builds a wordbank and a layered n-gram model from whatever text you feed it.
1. Building the corpus / wordbank
- Paste text into the box and click Add to Corpus.
- Or upload a
.txtfile – its contents are merged automatically. - The token and unique word counts show how large the wordbank is.
2. Hidden N-gram layers
- Visible layer: a 2-word Markov chain (bigrams). It looks at pairs of words and learns which word tends to follow.
- Hidden layer: a 3-word chain (trigrams) that tracks longer phrases in the background.
- During generation, the engine blends the visible bigram distribution with the hidden trigram distribution to choose each next word.
- If the corpus is tiny, it falls back to looser random jumps so it still produces output.
3. Controls
- Approx. output length – target number of words.
- Randomness – lower values hug the learned patterns; higher values wander into stranger regions of the chain.
- Clear Corpus – wipes the wordbank so you can start fresh.
- Copy Output – copies the generated text to your clipboard.
To increase the size and richness of the wordbank, just keep adding more text. The hidden n-gram layer quietly tracks longer spans, so as your corpus grows, the generator starts to echo your rhythms, idioms, and motifs.
No comments:
Post a Comment