org.egothor.parser.filter
Class DoubleMetaphone

java.lang.Object
  extended by org.egothor.parser.filter.DoubleMetaphone

public final class DoubleMetaphone
extends java.lang.Object

This module implements a "sounds like" algorithm developed by Lawrence Philips which he published in the June, 2000 issue of C/C++ Users Journal. Double Metaphone is an improved version of Philips' original Metaphone algorithm.

This version contains improvements by David Dossot <david@dossot.net>.

This code is based on an implementation by Ed Parrish, which was obtained from: http://www.cse.ucsc.edu/~eparrish/toolbox/search.html See also: http://aspell.sourceforge.net/metaphone/ for more info.

Author:
David Dossot

Constructor Summary
DoubleMetaphone()
          Creates new DoubleMetaphone
 
Method Summary
 java.lang.String encode(java.lang.String sin)
          Description of the Method
 java.lang.String getAlternate()
          Gets the alternate attribute of the DoubleMetaphone object
 java.lang.StringBuilder getAlternateBuffer()
          Gets the alternateBuffer attribute of the DoubleMetaphone object
 int getEncodeLimit()
          Gets the encodeLimit attribute of the DoubleMetaphone object
 java.lang.String getPrimary()
          Gets the primary attribute of the DoubleMetaphone object
 java.lang.StringBuilder getPrimaryBuffer()
          Gets the primaryBuffer attribute of the DoubleMetaphone object
static java.lang.String sencode(java.lang.String in)
          Description of the Method
 boolean setEncodeLimit(int newLimit)
          Sets the encodeLimit attribute of the DoubleMetaphone object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleMetaphone

public DoubleMetaphone()
Creates new DoubleMetaphone

Method Detail

setEncodeLimit

public boolean setEncodeLimit(int newLimit)
Sets the encodeLimit attribute of the DoubleMetaphone object

Parameters:
newLimit - The new encodeLimit value
Returns:
Description of the Return Value

getAlternate

public java.lang.String getAlternate()
Gets the alternate attribute of the DoubleMetaphone object

Returns:
The alternate value

getAlternateBuffer

public java.lang.StringBuilder getAlternateBuffer()
Gets the alternateBuffer attribute of the DoubleMetaphone object

Returns:
The alternateBuffer value

getEncodeLimit

public int getEncodeLimit()
Gets the encodeLimit attribute of the DoubleMetaphone object

Returns:
The encodeLimit value

getPrimary

public java.lang.String getPrimary()
Gets the primary attribute of the DoubleMetaphone object

Returns:
The primary value

getPrimaryBuffer

public java.lang.StringBuilder getPrimaryBuffer()
Gets the primaryBuffer attribute of the DoubleMetaphone object

Returns:
The primaryBuffer value

sencode

public static java.lang.String sencode(java.lang.String in)
Description of the Method

Parameters:
in - Description of the Parameter
Returns:
Description of the Return Value

encode

public java.lang.String encode(java.lang.String sin)
Description of the Method

Parameters:
sin - Description of the Parameter
Returns:
Description of the Return Value