vc_leven: VC-sensitive edit distance for Dialectometry

Description Usage Arguments Value References Examples

View source: R/RcppExports.R

Description

An edit distance that is sensitive to vowel and consonant alignment. If the aligned segments are a vowel-consonant pair, the difference is penalized as a score of 2; if not, 1. Allows for normalization by dividing alignment length, and for accommodating multiple responses with Bilbao distance, as proposed by Aurrekoetxea et al (2020).

Usage

1
vc_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
vc_leven("hit", "hot/hit", alignment_normalization = TRUE, delim = "/")

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