public class Metaphone extends Object implements Simplifier
All input is converted to upper case. Limitations: Input format is expected to be a single ASCII word with only characters in the A - Z range, no punctuation or numbers.
This class is thread-safe and immutable.
Metaphone
Constructor and Description |
---|
Metaphone()
Creates an instance of the Metaphone simplifier
|
Metaphone(int maxCodeLength)
Creates an instance of the Metaphone simplifier with a
maxCodeLength . |
Modifier and Type | Method and Description |
---|---|
String |
simplify(String input)
Simplifiers the input string.
|
String |
toString() |
public Metaphone()
public Metaphone(int maxCodeLength)
maxCodeLength
. All encodings will have at most
maxCodeLength
characters.maxCodeLength
- maximum length of the encodingpublic String simplify(String input)
Simplifier
simplify
in interface Simplifier
input
- string to simplifyCopyright © 2014–2018. All rights reserved.