utils.metaphone

Returns metaphones (sound-alike codes) for the supplied word

Prototype

m1, m2 = utils.metaphone (word)

Description

This returns one or two metaphones (sound-alike codes) for the supplied word. This is the same behaviour as the world.Metaphone function, except that this one returns the secondary metaphone as a separate result.

eg.

print (utils.metaphone ("swordfish"))  --> SRTF XRTF

Lua functions

Topics