# `gno.land/r/moul/x/daily/ahocorasickdemo/v0` **A gnoweb demo of [`p/moul/x/daily/ahocorasick`](/p/moul/x/daily/ahocorasick/v0)**: two scans, no state, no search logic of its own. ``` /r/moul/x/daily/ahocorasickdemo/v0 the textbook automaton and the sentence scan /r/moul/x/daily/ahocorasickdemo/v0:/thermos scan your own text with the same dictionary ``` The first table is the 1975 paper's own example, `he` / `she` / `his` / `hers` over `ushers`, which is the smallest input where the interesting thing happens: three of the four patterns overlap and one of them is only found through a failure link. The second runs a five word dictionary over a sentence and prints the count that is the whole claim, the bytes were read once and running a single-pattern scan per word would have read them five times. **Fixed inputs, never chain state, deliberately.** Every value rendered here is a package level variable. Output that moved with the block height could not be pinned by `ExampleRender`, and an unpinned `Render` is how a realm ships a page nobody ever read. **The match table never echoes a slice of the scanned text.** It reports offsets and the pattern that matched, and the patterns are this realm's own constants. So the visitor's text reaches the page exactly once, in the heading that echoes it, where it goes through `md.InlineCode` and not `ui.Cell`: it sits inside a code span, a cell escaper backslashes a backtick, and a backslash does not close a backtick inside a span. Only a fence wider than anything in the argument does, which is what `md.InlineCode` picks. A realm's `Render` can never be fixed once the path is live. `parseArg` takes the one routing slash off and nothing else: it does not cut at a later slash and it does not trim. A page that offers to scan what the caller typed either scans that string or says it found nothing, and never quietly substitutes a shorter or tidier one, which would report offsets into a string nobody submitted. Built for gno 0.9. --- 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. **On mainnet:** [![deployment status](https://gnoscope.com/_badges/shield/status/r/moul/x/daily/ahocorasickdemo/v0?network=mainnet)](https://gnoscope.com/realm/r/moul/x/daily/ahocorasickdemo/v0) [![transactions](https://gnoscope.com/_badges/shield/txs/r/moul/x/daily/ahocorasickdemo/v0?network=mainnet)](https://gnoscope.com/realm/r/moul/x/daily/ahocorasickdemo/v0) [![unique callers](https://gnoscope.com/_badges/shield/users/r/moul/x/daily/ahocorasickdemo/v0?network=mainnet)](https://gnoscope.com/realm/r/moul/x/daily/ahocorasickdemo/v0) [![deployed revision](https://gnoscope.com/_badges/shield/version/r/moul/x/daily/ahocorasickdemo/v0?network=mainnet)](https://gnoscope.com/realm/r/moul/x/daily/ahocorasickdemo/v0) **Dependency graph:** ![gno.land/r/moul/x/daily/ahocorasickdemo/v0 dependency graph](https://raw.githubusercontent.com/moul/gno-contracts/main/_assets/gno.land/r/moul/x/daily/ahocorasickdemo/v0/deps.png) > ๐Ÿงช **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).