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

v0 source realm

Package textlab runs every string algorithm in p/moul over one input at once, so they can be compared rather than rea...

Readme View source

gno.land/r/moul/x/allinone/textlab

Every string algorithm in p/moul over one input at once, so they can be compared instead of read about one at a time.

/r/moul/x/allinone/textlab/v0:knight        one word
/r/moul/x/allinone/textlab/v0:knight/night  compared with another
/r/moul/x/allinone/textlab/v0:1987          read as a roman numeral

Eight packages: soundex, levenshtein, rot13, piglatin, romannum, plus kit/ui, md, realmpath and r/moul/config.

What the combination shows

soundex and levenshtein both claim to tell you whether two words are alike, and they are measuring different things. soundex keys on the first letter and then on consonant classes, so it is blind to how the rest is spelled. levenshtein counts edits and is blind to how it sounds.

pair soundex levenshtein
knight / night K523 vs N230, unrelated 1 edit, 83% similar
robert / rupert R163 vs R163, identical 2 edits, 67% similar

The first is the clean case: one edit apart, and yet soundex says no, because the silent K changes the first character of the code. Measured 2026-09-23 against the packages in this tree and pinned by TestTheDisagreement, so the page cannot start saying something false without the suite going red.

One defect worth keeping in mind

romannum.FromRoman panics on a string that is not a roman numeral rather than returning zero. The input here comes out of a URL, so it is screened by isRomanNumeral first. Without that screen the default view aborted, because knight is not a roman numeral and neither is most of what anyone would type.

No state at all: the input comes from the render path and nothing is stored.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

Dependency graph:

gno.land/r/moul/x/allinone/textlab/v0 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.

Overview

Package textlab runs every string algorithm in p/moul over one input at once, so they can be compared rather than read about one at a time.

Each of these has its own demo realm showing it alone. What none of those can show is how the answers differ for the SAME word, which is the only question a reader actually has: soundex and levenshtein both claim to tell you whether two words are alike, and they are measuring different things.

soundex keys on the FIRST LETTER and then on consonant classes, so it is blind to how the rest is spelled. levenshtein counts edits and is blind to how it sounds. "knight" and "night" are the clean case: one edit apart (83% similar) and yet soundex calls them unrelated, K523 against N230, because the silent K changes the first character of the code. "robert" and "rupert" go the other way, identical codes at two edits apart. Measured 2026-09-23 against the packages in this tree, not quoted from a textbook.

Example
1/r/moul/x/allinone/textlab/v0:knight
2/r/moul/x/allinone/textlab/v0:knight/night   compares two

Eight packages, no state, nothing to redeploy carefully: the input comes out of the render path and nothing is stored.

Functions 1

func Render

1func Render(path string) string
source

Render takes its input from the path: one word, or two separated by "/".

Imports 11

Source Files 4