Forum und email

soundex

(PHP 4, PHP 5)

soundex — 문자열의 soundex 키를 계산합니다.

설명

string soundex ( string $str )

str 의 soundex 키를 계산합니다.

발음이 유사한 단어들은 같은 soundex 키를 생성하기에, 발음은 알고 있지만 스펠은 모르는 단어를 데이터베이스에서 쉽게 찾을 수 있습니다. soundex 함수는 문자로 시작하는 4 문자 문자열을 반환합니다.

이 soundex 함수는 "The Art Of Computer Programming, vol. 3: Sorting And Searching", Addison-Wesley (1973), 391-392쪽에서 Donald Knuth가 기술한 것입니다.

Example#1 Soundex 예제

<?php
soundex
("Euler") == soundex("Ellery"); // E460
soundex("Gauss") == soundex("Ghosh"); // G200
soundex("Hilbert") == soundex("Heilbronn"); // H416
soundex("Knuth") == soundex("Kant"); // K530
soundex("Lloyd") == soundex("Ladd"); // L300
soundex("Lukasiewicz") == soundex("Lissajous"); // L222
?>

참고: levenshtein(), metaphone(), similar_text().