Sujet : Re: (Long post) Metaphone Algorithm In AWK
De : porkchop (at) *nospam* invalid.foo (Mike Sanders)
Groupes : comp.lang.awkDate : 21. Aug 2024, 02:07:29
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <va3ekh$3it79$1@dont-email.me>
References : 1 2 3 4
User-Agent : tin/2.6.2-20221225 ("Pittyvaich") (NetBSD/9.3 (amd64))
Ben Bacarisse <
ben@bsb.me.uk> wrote:
I don't know what your are asking for as this (your latest AWK) is not
just an implementation of the metaphone algorithm. With the extra
Levenshtein test it "texas" matches only a few words.
Not seeking/asking for anything Ben, just enjoy the ride =)
As for my Metaphone take... In fact it is. Several Metaphone variants
use Levenshtein & can be any mixture of three types of Metaphone
versions further still, or even a mix. Seems that's the way it is
in the wild...
However, if I remove the extra condition (that levenshtein($x, find) <=
2) your AWK code matches a different set of words to the C
implementation. Looking a bit deeper, your AWK code give the code TKSS
to the word "texas" but the C code assigns is "TKS".
Just differing metaphone variants, witness...
Texas = Tex[ess] (if phonetically pronounced - almost slurred sounding)
But hey: Many thanks for your input kind sir, I appreciate it.
-- :wqMike Sanders