Interface CharacterSubstitutionInterface


  • 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 Detail

      • cost

        double cost​(char c1,
                    char c2)
        Indicate the cost of substitution c1 and c2.
        Parameters:
        c1 - The first character of the substitution.
        c2 - The second character of the substitution.
        Returns:
        The cost in the range [0, 1].