# `gno.land/r/moul/x/daily/markovdemo/v0`
Live demo of the [`p/moul/x/daily/markov`](https://github.com/moul/gno-contracts/tree/main/p/moul/x/daily/markov/v0)
Markov-chain text generator.
Holds one package-level `markov.Chain` as the on-chain corpus and wires it to the
chain — babbling is seeded by `runtime.ChainHeight()`, so `Generate` stays a pure,
reproducible query that still varies block to block. The realm ships pre-seeded
with a couple of sentences, so a fresh deploy already babbles:
- `Feed(cur, text)` — tokenize `text` and fold it into the corpus (the crossing
function; any caller may enrich it).
- `Generate(nWords) string` — babble ~`nWords` words, seeded by the block height.
- `Stats() (int, int)` — returns `(totalWords, prefixCount)`.
- `Render("/60")` — a fresh 60-word sample plus corpus stats and a sample of
prefix → suffix rows; `Render("")` defaults to 40 words.
All build/walk math lives in the library; this realm is just the wiring and the
gnoweb view. Render it at [`/r/moul/x/daily/markovdemo/v0`](https://gno.land/r/moul/x/daily/markovdemo/v0).
<!-- BEGIN GNOCONTRACTS FOOTER (generated by `make readmes`; do not edit below) -->
---
Part of **[moul/gno-contracts](https://github.com/moul/gno-contracts)** — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
**Dependency graph:**

> 🧪 **Highly experimental — potentially vibe-coded.** Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: [DISCLAIMER](https://github.com/moul/gno-contracts/blob/main/DISCLAIMER.md).
<!-- END GNOCONTRACTS FOOTER -->
Feed(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, text string) string
Generate(nWords int) string
Render(path string) string
Stats() (int, int)
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.