leven: Edit distance for Dialectometry

Description Usage Arguments Value References Examples

View source: R/RcppExports.R

Description

An edit distance for use in Dialectometry. Allows for normalization by dividing alignment length, and for accommodating multiple responses with Bilbao distance, as proposed by Aurrekoetxea et al (2020).

Usage

1
leven(vec1, vec2, alignment_normalization = FALSE, delim = NULL)

Arguments

vec1

A vector of words.

vec2

A vector of words to be compared against.

alignment_normalization

A logical value, indicating whether or not the difference scores are to be normalized by alignment length.

delim

An optional delimiter, in situations where multiple responses exist in the data.

Value

A number indicating the number of operations to transform a string to the other, which optionally may undergo length normalization.

References

Aurrekoetxea, G., Nerbonne, J., and Rubio, J. 2020. Unifying Analyses of Multiple Responses. Dialectologia, 25:59–86.

Examples

1
leven("hit", "hot/hit", alignment_normalization = TRUE, delim = "/")

dialectR documentation built on May 20, 2021, 9:06 a.m.