public class

NameDistance

extends Object
java.lang.Object
   ↳ com.android.providers.contacts.NameDistance

Class Overview

A string distance calculator, particularly suited for name matching.

A detailed discussion of the topic of record linkage in general and name matching in particular can be found in this article:

Winkler, W. E. (2006). "Overview of Record Linkage and Current Research Directions". Research Report Series, RRS.

Summary

Public Constructors
NameDistance(int maxLength)
Constructor.
NameDistance()
Constructor for a matcher that only checks if one string is the exact prefix of the other
Public Methods
float getDistance(byte[] bytes1, byte[] bytes2)
Computes a string distance between two normalized strings passed as byte arrays.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public NameDistance (int maxLength)

Constructor.

Parameters
maxLength byte arrays are truncated if longer than this number

public NameDistance ()

Constructor for a matcher that only checks if one string is the exact prefix of the other

Public Methods

public float getDistance (byte[] bytes1, byte[] bytes2)

Computes a string distance between two normalized strings passed as byte arrays.