{"id":1122,"date":"2017-09-08T18:51:25","date_gmt":"2017-09-08T18:51:25","guid":{"rendered":"http:\/\/punjabirevolution.com\/?page_id=1122"},"modified":"2017-09-08T18:51:25","modified_gmt":"2017-09-08T18:51:25","slug":"soundex-algorithm","status":"publish","type":"page","link":"http:\/\/punjabirevolution.com\/index.php\/soundex-algorithm\/","title":{"rendered":"Soundex Algorithm"},"content":{"rendered":"<h1>Soundex Algorithm<\/h1>\n<p>The soundex algorithm is used to find the misspelled names. While searching the name of a person, we usually make mistakes. For instance the name Jurafsky can be misspelled like Jarofsky, Jarovsky, and Jarovski. By using the soundex algorithm, we can find all the modified forms of the name Jurafsky. This algorithms is mostly used in libraries, particularly&nbsp; for English names.<\/p>\n<h2>Steps for Soundex Algorithm<\/h2>\n<p>Step 1: Keep the initial letter or character as it is. Drop the following letters if they are occurring at start of the word<br>\na,e,i,o,u,y,w,h<\/p>\n<p>Step 2: Replace the remaining letters with digits as under. Please keep the first letter unchanged.<br>\nb, f, p, v &rarr;1<br>\nc, g, j, k, q, s, x, z &rarr;2<br>\nd, t &rarr; 3<br>\nl &rarr; 4<br>\nm, n &rarr;5<br>\nr &rarr;6<\/p>\n<p>Step 3: if the same number is repeated consecutively. keep just one occurrence and delete the rest.<\/p>\n<p>Step 4: The usual format for Soundex is Letter Digit Digit Digit i.e.( the first letter followed by three digits). If the soundex code as more than three digits, we delete the extra digits and add trailing zeros if there are less than three digits.<\/p>\n<h2>Example:<\/h2>\n<p>Name :Jurafsky<\/p>\n<p>Step 1: Jrfsk<br>\nStep 2: J6122&nbsp; \/\/ mapping from letter to digits<br>\nStep 3:&nbsp; J612 &nbsp; \/\/ deleting the consecutively repeated digits<\/p>\n<p>Name :Jarofsky<\/p>\n<p>Step 1: Jrfsk<br>\nStep 2: J6122&nbsp; \/\/ mapping from letter to digits<br>\nStep 3:&nbsp; J612 &nbsp; \/\/ deleting the consecutively repeated digits<\/p>\n<p>Name :Jarovsky<\/p>\n<p>Step 1: Jrvsk<br>\nStep 2: J6122&nbsp; \/\/ mapping from letter to digits<br>\nStep 3:&nbsp; J612 &nbsp; \/\/ deleting the consecutively repeated digits<\/p>\n<p>Name :Jarovski<\/p>\n<p>Step 1: Jrvsk<br>\nStep 2: J6122&nbsp; \/\/ mapping from letter to digits<br>\nStep 3:&nbsp; J612 &nbsp; \/\/ deleting the consecutively repeated digits<\/p>\n<p>Name: Bill<\/p>\n<p>Step 1: Bll \/\/ removing vowels and y,w,h<br>\nStep 2:B44 \/\/ mapping from letters to digits<br>\nStep 3:B4 \/\/ removing consecutive repetition.<br>\nStep 4: B400 \/\/ Adding trailing zeros to get the format LetterDigitDigitDigit<\/p>\n<p>Name: Clinton<\/p>\n<p>Step 1: Clntn \/\/ removing vowels and y,w,h<br>\nStep 2:C4535 \/\/ mapping from letters to digits<br>\nStep 3: C453&nbsp; \/\/ Removing extra digits to get the format LetterDigitDigitDigit<\/p>\n<h2>Usage in Databases.<\/h2>\n<p>The algorithm has been implemented in databse servers like MySQL and SQL servers etc. You can find and compare the soundex code by built in soundex function.&nbsp; Here is a sample MySQL statement to find the soundex code for any string.<\/p>\n<p>SELECT SOUNDEX(&lsquo;Clinton&rsquo;);<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Soundex Algorithm The soundex algorithm is used to find the misspelled names. While searching the name of a person, we usually make mistakes. For instance the name Jurafsky can be misspelled like Jarofsky, Jarovsky, and Jarovski. By using the soundex algorithm, we can find all the modified forms of the name Jurafsky. This algorithms is &hellip; <a href=\"http:\/\/punjabirevolution.com\/index.php\/soundex-algorithm\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Soundex Algorithm&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/punjabirevolution.com\/index.php\/wp-json\/wp\/v2\/pages\/1122"}],"collection":[{"href":"http:\/\/punjabirevolution.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/punjabirevolution.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/punjabirevolution.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/punjabirevolution.com\/index.php\/wp-json\/wp\/v2\/comments?post=1122"}],"version-history":[{"count":1,"href":"http:\/\/punjabirevolution.com\/index.php\/wp-json\/wp\/v2\/pages\/1122\/revisions"}],"predecessor-version":[{"id":1123,"href":"http:\/\/punjabirevolution.com\/index.php\/wp-json\/wp\/v2\/pages\/1122\/revisions\/1123"}],"wp:attachment":[{"href":"http:\/\/punjabirevolution.com\/index.php\/wp-json\/wp\/v2\/media?parent=1122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}