distance_matrix: Distance matrix for Dialectometry

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Computes a distance matrix between dialect varieties, the results of which may be used for further analyses and plotting.

Usage

1
2
3
4
5
6
distance_matrix(
  dialect_data,
  funname,
  alignment_normalization = FALSE,
  delim = NULL
)

Arguments

dialect_data

A dataframe of dialect data, transcribed in the International Phonetic Alphabet.

funname

The distance metric to be used. This can be chosen from the following: "leven", "vc_leven".

alignment_normalization

A logical value, indicating whether or not the distance scores should be normalized by alignment length.

delim

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

Value

A distance matrix, where the values are the difference between dialects based on edit distance.

Examples

1
2
3
data(Dutch)
Dutch <- Dutch[1:3,1:3]
distance_matrix(Dutch, funname = "vc_leven", alignment_normalization = TRUE)

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