EditDistance

esc.similarity.EditDistance
object EditDistance

this object provides useful methods using the edit distance as based method.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def getEditDistance[A](textA: Iterable[A], textB: Iterable[A]): (Int, Double, Double)

Returns three values for the edit distance (a, b, c). a = Edit distance as integer (exmpl. 2) b = The reduction value as double (exmpl. 0.5) c = The netto/weighted edit distance as double, a-b (exampl. 1.5)

Returns three values for the edit distance (a, b, c). a = Edit distance as integer (exmpl. 2) b = The reduction value as double (exmpl. 0.5) c = The netto/weighted edit distance as double, a-b (exampl. 1.5)

Value parameters

textA

Text a) for comparison.

textB

Text b) for comparison.

Attributes

Returns

Return a Tuple with the edit distande, reduction value an weighted edit distance.

def getEditDistanceSimilarity(textA: String, textB: String): Double

Returns a weighted normalized similarity value between 0 and 1. 0 means no similarity, 1 is 100% similarity/exact match.

Returns a weighted normalized similarity value between 0 and 1. 0 means no similarity, 1 is 100% similarity/exact match.

Value parameters

textA

Text a) for comparison.

textB

Text b) for comparison.

Attributes

Returns

Return the edit distance similarity (value between 0 and 1).