PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/p/moul/x/daily/soundex/v0

Package
Open in gnoweb ↗

Overview

Kind
Pure package
Name
v0
Namespace
moul / x / daily / soundex
Files
3 (README)(gnomod.toml)
Exported functions
n/a — not supported for pure packages by the node (vm/qfuncs)
Module
gno.land/p/moul/x/daily/soundex/v0
gno
0.9

Files (3)

  • README.mdmarkdown
  • gnomod.tomltoml
  • soundex.gnogno
README.mdPreviewRaw
# `gno.land/p/moul/x/daily/soundex/v0`

**Soundex phonetic algorithm** — `Encode`, `Match`, `EncodeAll`, `Normalize`.

Names that sound alike in English encode to the same four-character key:
`Robert` and `Rupert` both give `R163`.

```go
import "gno.land/p/moul/x/daily/soundex/v0"

soundex.Encode("Robert")    // "R163"
soundex.Encode("Ashcraft")  // "A261"
soundex.Match("Robert", "Rupert")  // true
```

The 1918 Russell/Odell algorithm as used by the US census, with the three rules
that are usually got wrong implemented explicitly — each has a test:

- **the first letter keeps its own code** and still suppresses a following
  consonant of the same code, so `Pfister` → `P236`, not `P123`;
- **`h` and `w` are transparent**: consonants either side are treated as
  adjacent, so `Ashcraft` → `A261`, not `A226`;
- **vowels are not transparent** — they separate, so a repeated code after a
  vowel is emitted again: `Tymczak` → `T522`.

Non-letters are ignored, so `O'Brien` and `OBrien` agree. Input with no ASCII
letters has **no key** (`""`), and `Match` never reports two such inputs as
matching — "no name" is not a name they share.

Soundex is English-centric and lossy *by design*: it is a **blocking key** for
finding candidates cheaply, never proof that two names are the same.

**Live demo:** [`r/moul/x/daily/soundexdemo`](https://github.com/moul/gno-contracts/tree/main/r/moul/x/daily/soundexdemo/v0)
· render it at [`/r/moul/x/daily/soundexdemo/v0`](https://gno.land/r/moul/x/daily/soundexdemo/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.

> 🧪 **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 -->

Functions

not supported for pure packages by the node (vm/qfuncs)

Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.