edu.northwestern.at.morphadorner.corpuslinguistics.stringsimilarity

## Class LetterEquivalence

- java.lang.Object
- - edu.northwestern.at.morphadorner.corpuslinguistics.stringsimilarity.LetterEquivalence

- All Implemented Interfaces:
    StringSimilarity

      public class LetterEquivalence
      extends java.lang.Object
      implements StringSimilarity

  Letter equivalence for two strings.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LetterEquivalence()` Create LetterEquivalence instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `letterEquivalence(java.lang.String s1, java.lang.String s2)` Compute letter equivalence for two strings.
    `static double` | `letterEquivalenceSimilarity(java.lang.String s1, java.lang.String s2)` Compute letter equivalence similarity of two strings.
    `double` | `similarity(java.lang.String s1, java.lang.String s2)` Compute letter equivalence similarity of two strings.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LetterEquivalence

          public LetterEquivalence()

      Create LetterEquivalence instance.

  - ### Method Detail

    - #### letterEquivalence

          public static int letterEquivalence(java.lang.String s1,
                              java.lang.String s2)

      Compute letter equivalence for two strings.
      Parameters:
        `s1` - First string.
        `s2` - Second string.
      Returns:
        Letter equivalence value.

    - #### letterEquivalenceSimilarity

          public static double letterEquivalenceSimilarity(java.lang.String s1,
                                           java.lang.String s2)

      Compute letter equivalence similarity of two strings.
      Parameters:
        `s1` - First string.
        `s2` - Second string.
      Returns:
        Similarity measure in the range [0,1] .

    - #### similarity

          public double similarity(java.lang.String s1,
                          java.lang.String s2)

      Compute letter equivalence similarity of two strings.
      Specified by:
        `similarity` in interface `StringSimilarity`
      Parameters:
        `s1` - First string.
        `s2` - Second string.
      Returns:
        Similarity measure in the range [0,1] .