Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Soundex is designed especially for comparing names commonly found in the USA, using mechanics instead of computers. Any other use is at least problematic:

It does not work to well with non-english names and words, simply because it groups consonants that share a similar sound IN ENGLISH. In other languages, those consonants often sound completely different. Vowels (except for a possible first one) are completely removed, so soundex removes too much information, especially in non-english languages. And, to make things worse, soundex cuts off after the first few characters. This is fine for english where the most common words and names have just one or two syllables. Other languages have more syllables per word, and so soundex returns just junk.

Example: D535 is the soundex code for both "Donaudampfschifffahrtsgesellschaft" (german: Danube steamboat shipping company -- a common stem for ridiculously long compound words) and "Donaudampfschiffkapitän" (german: Danube steamboat capitain), two things that are hardly the same. Of course, this example is made up, but from some tests in old times I know that soundex does not work for german names. It simplyfies wrong and it simplyfies too much for the german language.

A second problem for soundex are "s", "sch", "ch", and "sh". Those letter combinations are spoken very differently in german, but soundex treats them all equal. This generates many false positives in german. Both "Schiff" (ship) and "Siff" (slang for dirt) share the same soundex code S100.

Another problem occurs with the french language. The last few letters are often silent, but soundex treats them like all other letters. So, "chevaux" (horse power) gets a soundex code of C120, but the "x" is silent, and "au" sounds like "o". So, the soundex code should better be C100 (like "chevo").

A problem shared for several languages including french and german are modified letters, like the german umlauts (äöüÄÖÜ), the german sharp S (ß), accented letters found in several european languages (like à, é, ë, ç), and so on. Soundex is simply not defined for those letters. It depends on the implementation how those letters are treated. They could be removed, they could be replaced by unaccented letters (àéëc => aeec), they could be replaced by replacement sequences (é => ee, ä => e), they could end up unmodified in the soundex code (Kä20).

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^2: Search for similar strings - to standardise by afoken
in thread Search for similar strings - to standardise by Sanjay

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-25 06:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found