/** * 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 --version (or -v or -V) prints out a version number * java DMSoundex --help (or -h or -H) prints out this help information * java DMSoundex Self test: prints out names and codes * java DMSoundex* 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: *Prints the DM soundex(es) for this name * more info on Daitch Mokotoff Soundex here: ") ; * http://www.jewishgen.org/infofiles/soundex.html#DM * http://www.avotaynu.com/soundex.html *
* 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 two entries, "350000" and "340000" ** * @version 0.1 (First Beta Release) */ /* * Copyright 2004 Joshua Levy * * This file implements the Daitch Mokotoff Soundex algorithm. * * You may use this source code or modify it and use the modified version * for any project (free, commercial or open source) as long as you do * the following two things. Both are required: * * 1. You must make a good faith effort to notify the author of this code * (contact information below) before starting to test whatever product, * service, or web site you are developing which includes this code, or * code derived from this code. Such notification must include an overview * of what is being developed or the web site address of such a description. * * 2. If I request it, you must provide one copy of the product, * or one instance of the service, or one subscription to the web site (if * a subscription is required to use it), to the author of this code. If * the product is available in several different formats (download and CD, * for example) then you may provide any format you wish. * * For example: * 1. If you are using this code in a open source or freely available * software project, a single email informing me of this project's web site, * containing downloading instructions, would fulfill both requirements. * 2. If you are using this code as part of the infrastructure of a web site, * and that web site requires paid subscriptions, then one email including * the web site's web address and a password, would fulfill both requirements * for as long as the password was valid. * * Contact information: * The author is Joshua Levy. * Email is joshualevy@yahoo.com * Phone is 408-245-5292 * Address is 1433 Hawk Ct., Sunnyvale, CA, 94087, USA */