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

levenshteindemo/v0 package

Overview

Package levenshteindemo is a small gnoweb demo of the Levenshtein edit-distance library provided by p/moul/x/daily/levenshtein(/p/moul/x/daily/levenshtein/v0): it renders an explanation, worked examples, and an interactive distance calculator with the full dynamic-programming table.

It contains no distance logic of its own — everything comes from `levenshtein.Distance`, `levenshtein.Matrix` and `levenshtein.Similarity`.

Function

Render

func Render(path string) string

Render implements the gnoweb view.

  • "" or "/" : explanation + examples.
  • "/<a>/<b>" : distance between a and b, with the DP table.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/daily/levenshteindemo/v0.Render()"

Result