Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

ahocorasickdemo/v0 package

Overview

Package ahocorasickdemo is a small gnoweb demo of the p/moul/x/daily/ahocorasick(/p/moul/x/daily/ahocorasick/v0) library: it runs one automaton over a text once and shows the overlapping matches a k-pass scan would have to pay k passes for.

It contains no search logic of its own. Stateless, so Render is deterministic.

Function

Render

func Render(path string) string
Ask AI Claude ChatGPT

Render renders the demo for gnoweb.

Example
1Render("") / Render("/")  -> the textbook automaton and the sentence scan
2Render("/<text>")         -> scan that text with the same dictionary

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1magld5ptgzaktqcexxq0pgq5lmdf0kz6re8hlv/x/daily/ahocorasickdemo/v0.Render()"

Result