Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlignTrace ¶ added in v1.2.0
AlignTrace aligns the two strings to the given trace. The resulting strings have then the same length as the given trace (counting unicode points).
func AlignTraceR ¶ added in v1.4.0
AlignTraceR aligns the two strings to the given trace. The resulting strings have then the same length as the given trace (counting unicode points).
func Distance ¶
Distance calculates the levenshtein distance between s1 and s2. Reference: [Levenshtein Distance](http://en.wikipedia.org/wiki/Levenshtein_distance).
Types ¶
type Mat ¶ added in v1.1.0
type Mat struct {
// contains filtered or unexported fields
}
Mat holds the matrix for the levenshtein distance calculation.
func (*Mat) Distance ¶ added in v1.1.0
Distance returns the Levenshtein-distance between two string.
func (*Mat) DistanceR ¶ added in v1.3.0
Distance returns the Levenshtein-distance between the two strings s1 and s2. Reference: [Levenshtein Distance](http://en.wikipedia.org/wiki/Levenshtein_distance).
type WMat ¶ added in v1.5.0
type WMat struct {
// contains filtered or unexported fields
}
WMat represents the weighted matrix.
func NewWMat ¶ added in v1.5.0
func NewWMat(weights WeightFunc) *WMat
NewWMat creates a new weighted matrix with the given weight function.