Class DMSoundex

java.lang.Object
  |
  +--DMSoundex

public class DMSoundex
extends java.lang.Object

This class implements the Daitch Mokotoff Soundex algorithm. More information on this soundex system can be found on these web sites: http://www.avotaynu.com/soundex.html http://www.jewishgen.org/infofiles/soundex.html#DM You can use it as a command line program, or a java class, and encorporate it into your own Java software. Compile this software with the following command:

    javac DMSoundex.java
 
To use it as a program, do this:
    java DMSoundex [name]
 
If you do not supply a name, then DMSoundex will run it's self test suite, printing out a list of names and their Daitch Mokotoff codes. To use this class from java code, you need to create a DMSoundex object, and then call one of three methods, as shown below:
     String r1 ;
     String r2 ;
     String ra[] ;
     DMSoundex dms = new DMSoundex() ;

     r1 = dms.soundexes("daich") ;
     r2 = dms.sencode("daich") ;
     ra = dms.soundex("daich") ;

     r1 will now contain: "350000 340000"
     r2 will contain "350000"
     ra will be an array with one entry, "350000"


Field Summary
 boolean debug
           
 
Constructor Summary
DMSoundex()
           
 
Method Summary
static java.lang.String getVersion()
           
static void main(java.lang.String[] args)
           
 java.lang.String sencode(java.lang.String name)
          Returns the first Daitch Mokotoff Soundex code for the string passed in.
 void setupTests()
           
 java.lang.String soundex(java.lang.String name)
          Returns all the Daitch Mokotoff Soundex codes for the string passed in, as a single string, with each code seperated by a space.
 java.lang.String[] soundexes(java.lang.String name)
          Returns an array of all the Daitch Molokov Soundex codes for the string passed in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public boolean debug
Constructor Detail

DMSoundex

public DMSoundex()
Method Detail

getVersion

public static java.lang.String getVersion()

sencode

public java.lang.String sencode(java.lang.String name)
Returns the first Daitch Mokotoff Soundex code for the string passed in. For example: dms.sencode("chelm") returns "586000"


soundex

public java.lang.String soundex(java.lang.String name)
Returns all the Daitch Mokotoff Soundex codes for the string passed in, as a single string, with each code seperated by a space. For example: dms.soundex("chelm") returns "586000 486000"


soundexes

public java.lang.String[] soundexes(java.lang.String name)
Returns an array of all the Daitch Molokov Soundex codes for the string passed in. For example: dms.soundex("chelm") returns {"586000","486000"}


setupTests

public void setupTests()

main

public static void main(java.lang.String[] args)