RefinedSoundex class

Encodes a string to a RefinedSoundex value. RefinedSoundex contains more groupings, no maximum length, and is optimized for spell checking words.

The strategy used by this class is unique because it's possible to support other languages or character sets by providing a custom mapping.

See Soundex for more background and references to Soundex algorithms.

A good description of Refined Soundex can be found here:

Implemented types

Constructors

RefinedSoundex()
Gets the defaultEncoder instance of a RefinedSoundex encoder.
factory
RefinedSoundex.fromMapping(Map<int, int> soundexMapping, {int maxLength = 0})
Creates a custom Soundex instance. This constructor can be used to provide custom mappings for non-Western character sets, etc.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
maxLength int
Maximum length of the encoding, where 0 indicates no maximum.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
soundexMapping Map<int, int>
The character mapping to use when encoding. A value of $nul means ignore the input character and do not encode it (e.g., vowels).
final

Methods

encode(String input) PhoneticEncoding?
Encodes a string using the Refined Soundex algorithm as configured.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

defaultEncoder RefinedSoundex
An instance of Soundex using the defaultMapping mapping.
final

Constants

defaultMapping → const Map<int, int>
This is a default mapping of the 26 letters used in US English.