public class Metaphone extends java.lang.Object implements Comparator
Title: Dataspace Framework
Description: An implementation of the Metaphone algorithm, and a comparator which considers strings to have a score of 0.9 if their Metaphone values match. http://www.wbrogden.com/java/Phonetic/index.html http://www.wbrogden.com/phonetic/index.html
Copyright: Copyright (c) 2013
Company: StreamScape Technologies
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Constructor and Description |
---|
Metaphone() |
Modifier and Type | Method and Description |
---|---|
double |
compare(java.lang.String s1,
java.lang.String s2) |
boolean |
isTokenized()
Returns true if the comparator breaks string values up into
tokens when comparing.
|
static java.lang.String |
metaphone(java.lang.String str)
Produces the Metaphone key for the given string.
|
public double compare(java.lang.String s1, java.lang.String s2)
compare
in interface Comparator
public boolean isTokenized()
Comparator
isTokenized
in interface Comparator
public static java.lang.String metaphone(java.lang.String str)
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.