object LevenshteinDistance extends EditDistance[Char]
Levenshtein com.nexthink.utils.parsing.distance is the classical string difference metric. It is the minimum number of single-character edits (i.e. insertions, deletions or substitutions) required to change one word into another. It is typically implemented with a dynamic programming approach.
See https://en.wikipedia.org/wiki/Levenshtein_distance
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- LevenshteinDistance
- EditDistance
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
-
case class
EditWeights(insertion: WeightComputation, deletion: WeightComputation, substitution: WeightComputation, maxPossibleWeight: Int) extends Product with Serializable
- Definition Classes
- EditDistance
-
type
WeightComputation = (Char, Char) ⇒ Int
- Definition Classes
- EditDistance
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val LevenshteinWeights: EditWeights
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def constantWeightOfOne(a: Char, b: Char): Int
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
normalizedEditDistance(a: Seq[Char], b: Seq[Char], weights: EditWeights): Double
- Attributes
- protected
- Definition Classes
- EditDistance
- def normalizedLevenshteinDistance(a: String, b: String): Double
- def normalizedLevenshteinSimilarity(a: String, b: String): Double
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )