starfuzz/phonetic

A module providing phonetic matching capabilities. Phonetic matching indexes words by how they sound (homophones), allowing comparison regardless of spelling variations (e.g., “Robert” and “Rupert”).

Values

pub fn same_soundex(a: String, b: String) -> Bool

Compares if two strings result in the exact same Soundex code.

pub fn soundex(input: String) -> String

Encodes the input string into its Soundex representation (typically a letter followed by 3 numbers).

Under the Soundex rules:

  • Letter casing is ignored.
  • Adjacent duplicated sounds are collapsed.
  • ‘H’ and ‘W’ act as silently omitted vowels unless they split different consonant sounds.
Search Document