2.3: How to Use SoundexStream


How the System Works

User input is passed through SoundexStream.java as Strings in the command line parameters. The 2 necessary parameters are the search string and the filename string. The search string is then sent to the SoundexConverter to be encoded in its Daitch-Mokotoff soundex values. The results will be an array of Strings, each string being 6 characters long and comprised of digits. Using these soundex values, a list of FSMs will be created, 1 per soundex value and each list containing 6 FSM parts.

From here, the system will use the command line parameter filename and read in the file line by line. Each word in the database file will be checked through the list of FSMs to see if it's a match. If it is a match, the line will be printed to the system and will then move on to the next line until the file is finished.

Configuring SoundexStream for Personal Use

The current configuration of SoundexStream is configured for use with Dan Hirschberg's Krakow Records system. However, the back-end program may be used as a standalone system, or integrated with a different existing system. If someone wishes to alter our system for use with theirs, only the SoundexStream file needs to be changed for their requirements.Some pieces that are specific for the current integration are the command line parameters quietMode and caseSensitive. These are not needed for the basic use of the SoundexStream system. Other than these items, the system is ready to go as long as it properly receives the filename and search query. One thing to keep in mind is that the data files must be in the same directory as the program itself.

For integration purposes, the system will be initiated via a command line call. The system with which the program will be run from requires the installation of a java virtual machine. Otherwise, the system may not be initialized.

For example:


C:\jdk\usr\username\bin\java SoundexStream "searchQuery" "locationofdb"
or
C:\jdk\usr\username\bin\java -cp "C:\locationofsourcefiles" SoundexStream "searchQuery" "locationofdb"
* Arguments in the command line are designated with double quotes and are each separated by a blank space.


For the system to receive the matching lines, results should be read in from the system since this is where SoundexStream prints to.