Top Description Methods
info.debatty.java.stringsimilarity

public Interface CharacterSubstitutionInterface


Used to indicate the cost of character substitution. Cost should always be in [0.0 .. 1.0] For example, in an OCR application, cost('o', 'a') could be 0.4 In a checkspelling application, cost('u', 'i') could be 0.4 because these are next to each other on the keyboard...
Author
Thibault Debatty

Method Summary

Modifier and TypeMethod and Description
public double

Returns:

The cost in the range [0, 1].
cost
(char
The first character of the substitution.
c1
,
char
The second character of the substitution.
c2
)

Indicate the cost of substitution c1 and c2.

Method Detail

costback to summary
public double cost(char c1, char c2)

Indicate the cost of substitution c1 and c2.

Parameters
c1:char

The first character of the substitution.

c2:char

The second character of the substitution.

Returns:double

The cost in the range [0, 1].