New York State Identification and Intelligence System
Encyclopedia
The New York State Identification and Intelligence System Phonetic Code, commonly known as NYSIIS, is a phonetic algorithm
Phonetic algorithm
A phonetic algorithm is an algorithm for indexing of words by their pronunciation. Most phonetic algorithms were developed for use with the English language; consequently, applying the rules to words in other languages might not give a meaningful result....

 devised in 1970 as part of the New York State Identification and Intelligence System (now a part of the New York State Division of Criminal Justice Services). It features an accuracy increase of 2.7% over the traditional Soundex
Soundex
Soundex is a phonetic algorithm for indexing names by sound, as pronounced in English. The goal is for homophones to be encoded to the same representation so that they can be matched despite minor differences in spelling. The algorithm mainly encodes consonants; a vowel will not be encoded unless...

algorithm.

The algorithm, as described in Name Search Techniques , is:
  1. Translate first characters of name: MAC → MCC, KN → N, K → C, PH, PF → FF, SCH → SSS
  2. Translate last characters of name: EE → Y, IE → Y, DT, RT, RD, NT, ND → D
  3. First character of key = first character of name.
  4. Translate remaining characters by following rules, incrementing by one character each time:
    1. EV → AF else A, E, I, O, U → A
    2. Q → G, Z → S, M → N
    3. KN → N else K → C
    4. SCH → SSS, PH → FF
    5. H → If previous or next is non-vowel, previous.
    6. W → If previous is vowel, A.
    7. Add current to key if current is not same as the last key character.
  5. If last character is S, remove it.
  6. If last characters are AY, replace with Y.
  7. If last character is A, remove it.
  8. Append translated key to value from step 3 (removed first character)
  9. If longer than 6 characters, truncate to first 6 characters. (only needed for true NYSIIS, some versions use the full key)

External links

  • NIST Dictionary of Algorithms and Data Structures entry, including pointers to several implementations: http://www.nist.gov/dads/HTML/nysiis.html
  • Sample coder, using a variant of the algorithm: http://www.dropby.com/indexLF.html?content=/NYSIIS.html
  • Python implementation of the dropby variant: http://metagram.webreply.com/downloads/nysiis.py
  • Simple Online NYSIIS Utility with GPL Source: http://www.utilitymill.com/utility/nysiis
  • Ruby Implementation: http://coryodaniel.com/index.php/2009/12/30/ruby-nysiis-implementation
  • C# Implementation: http://sounditout.codeplex.com/
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK