Object/Class

peds.commons.collection

StringWithSimilarity

Related Docs: class StringWithSimilarity | package collection

Permalink

object StringWithSimilarity

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StringWithSimilarity
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class MatchResults(numberOfMatches: Int = 0, numberOfTransposes: Int = 0) extends Product with Serializable

    Permalink

    Instead of making two seperate functions for matching and transposes (which would be terrible since you find the transpose while doing matching), I created this little class to hold the results of both.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def determineMatchesAndTransposes(lhs: String, rhs: String): MatchResults

    Permalink

    Find the all of the matching and transposed characters in two strings

    Find the all of the matching and transposed characters in two strings

    lhs

    First String

    rhs

    Second String

    returns

    A Match Result with both the number of matches and number of transposed characters

  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. def jaroDistance(numMatches: Int, numTransposes: Int, lhsLength: Int, rhsLength: Int): Double

    Permalink

    Determine the Jaro Distance.

    Determine the Jaro Distance. Winkler stole some of Jaro's thunder by adding some more math onto his algorithm and getting equal parts credit! However, we still need Jaro's Distance to get the Jaro-Winkler Distance. Equation: 1/3 * ((|A| / m) + (|B| / m) + ((m - t) / m)) Where: |A| = length of first string |B| = length of second string m = number of matches t = number of transposes

    numMatches

    Number of matches

    numTransposes

    Number of transposes

    lhsLength

    Length of String one

    rhsLength

    Length of String two

    returns

    Jaro Distance

  14. def matchingWindow(lhs: String, rhs: String): Int

    Permalink

    Determine the maximum window size to use when looking for matches.

    Determine the maximum window size to use when looking for matches. The window is basically a little less than the half the longest string's length. Equation: [ Max(A, B) / 2 ] -1

    lhs

    First String

    rhs

    Second String

    returns

    Max window size

  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. val prefixScalingFactor: Double

    Permalink
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. val trace: Trace[DefaultLogger]

    Permalink
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. def winklerCommonPrefix(lhs: String, rhs: String): Int

    Permalink

    Find the Winkler Common Prefix of two strings.

    Find the Winkler Common Prefix of two strings. In Layman's terms, find the number of character that match at the beginning of the two strings, with a maximum of 4.

    lhs

    First string

    rhs

    Second string

    returns

    Integer between 0 and 4 representing the number of matching characters at the beginning of both strings.

Inherited from AnyRef

Inherited from Any

Ungrouped