|
Class: PhoneticStringComparator (private in PhoneticStringUtilities
This class is only visible from within
PhoneticStringUtilities.
Object
|
+--PhoneticStringUtilities::PhoneticStringComparator
|
+--PhoneticStringUtilities::DaitchMokotoffStringComparator
|
+--PhoneticStringUtilities::DoubleMetaphoneStringComparator
|
+--PhoneticStringUtilities::ExtendedSoundexStringComparator
|
+--PhoneticStringUtilities::SingleResultPhoneticStringComparator
- Package:
- stx:libbasic2
- Category:
- Collections-Text-Support
- Owner:
- PhoneticStringUtilities
abstract superclass for various phonetic comparators.
They returns similar strings for similar sounding words, which can be used
to find similar sounding words in a search list.
Notice, that some comparators are better for particular languages.
constant
-
defaultClass
-
instance creation
-
new
-
(comment from inherited method)
return an instance of myself without indexed variables
queries
-
isAbstract
-
(comment from inherited method)
Return if this class is an abstract class.
True is returned for Object here; false for subclasses.
Abstract subclasses must redefine this again.
utilities
-
does: aString soundLike: anotherString
-
return true, if aString sounds similar to anotherString
Usage example(s):
PhoneticStringUtilities::SoundexStringComparator does:'miller' soundLike:'miler'.
PhoneticStringUtilities::SoundexStringComparator does:'miller' soundLike:'milner'.
PhoneticStringUtilities::SoundexStringComparator does:'müller' soundLike:'mueller'.
PhoneticStringUtilities::KoelnerPhoneticCodeStringComparator does:'müller' soundLike:'mueller'.
PhoneticStringUtilities::DoubleMetaphoneStringComparator does:'müller' soundLike:'mueller'.
|
-
encode: word
-
return a phonetic encoding for a word.
This can eg. be used as key to map/hash similar sounding words
Usage example(s):
SoundexStringComparator encode:'Fischer' -> 'F260'
SoundexStringComparator encode:'Fiescher' -> 'F260'
Caverphone2StringComparator encode:'Fischer' -> 'FSKA111111'
Caverphone2StringComparator encode:'Fiescher' -> 'FSKA111111'
MRAStringComparator encode:'Fischer' -> 'FSCHR'
MRAStringComparator encode:'Fiescher' -> 'FSCHR'
SpanishPhoneticCodeStringComparator encode:'Fischer' -> '24429'
SpanishPhoneticCodeStringComparator encode:'Fiescher' -> '24429'
DoubleMetaphoneStringComparator encode:'Fischer' -> 'FXR'
DoubleMetaphoneStringComparator encode:'Fiescher' -> 'FXR'
|
api
-
does: aString soundLike: anotherString
-
return true, if aString sounds similar to anotherString
Usage example(s):
PhoneticStringUtilities::SoundexStringComparator new does:'miller' soundLike:'miler'.
PhoneticStringUtilities::SoundexStringComparator new
does:'miller' soundLike:'milner'.
PhoneticStringUtilities::SoundexStringComparator new
does:'müller' soundLike:'mueller'.
PhoneticStringUtilities::KoelnerPhoneticCodeStringComparator new
does:'müller' soundLike:'mueller'.
|
-
phoneticStringsFor: aString
-
Should answer an array of alternate phonetic strings for the given input string.
** This method must be redefined in concrete classes (subclassResponsibility) **
initialization
-
initialize
-
Invoked when a new instance is created.
Usage example(s):
super initialize. -- commented since inherited method does nothing
|
PhoneticStringUtilities::SoundexStringComparator new
does:'miller' soundLike:'miler'.
PhoneticStringUtilities::SoundexStringComparator new
does:'miller' soundLike:'milner'.
PhoneticStringUtilities::SoundexStringComparator new
does:'müller' soundLike:'mueller'.
PhoneticStringUtilities::KoelnerPhoneticCodeStringComparator new
does:'müller' soundLike:'mueller'.
|