String function Library: Soundex

Source: Internet
Author: User
Keywords PHP Chinese function Manual Soundex
Tags aliyun function function library html http key php php chinese function manual

Soundex

(PHP3, PHP4)

Soundex---&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; To calculate the pronunciation key for a string

Syntax: String soundex (String str)

Description:

Evaluates the pronunciation key (soundex key) value of the string str.

One feature of the pronunciation keys is that the same pronunciation word produces the same pronunciation key. If you know the pronunciation of the word but do not know how to spell, you can use this feature, in the database to make a simple search. This function returns a 4-character string that begins with a letter.

This particular function is described by Donald Knuth in "The Art of Computer Programming, vol. 3:sorting and Searching", AW (1973), pp. 391-392.

Example:

Soundex ("Euler") = = Soundex ("ellery") = = ' E460 ';

Soundex ("Gauss") = = Soundex ("Ghosh") = = ' G200 ';

Soundex ("Knuth") = = Soundex ("Kant") = = ' H416 ';

Soundex ("Lloyd") = = Soundex ("Ladd") = = ' L300 ';

Soundex ("Lukasiewicz") = = Soundex ("lissajous") = = ' L222 ';

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.