Learn R Programming

alineR (version 1.1.4)

ALINE.segments: Similarity scores of aligned segments

Description

Return vector of similarity scores for each optimally aligned segment.

Usage

ALINE.segments(result, 
	Syllabic = 5, Place = 40, Stop = 50, 
	Voice = 10, Nasal = 10, Retroflex = 10,
	Lateral = 10, Aspirated = 5, Long = 1,
	High = 5, Back = 5, Round = 5, sk=10)

Arguments

result

The value returned from raw.alignment() function, which is a list containing four elements.

Syllabic, Place, Stop, Voice, Nasal, Retroflex, Lateral, Aspirated, Long, High, Back, Round

Feature weight used by the ALINE algorithm to determine the phonetic distance.

sk

Skip penalty in determining the alignment

Value

vec

A numeric vector. The length of the vestor is equal to the number of aligned segments. The value of the ith element is the similarity score for that segment pair.

Details

This function returns the similarity scores for each pair of aligned segments from the optimal alignment. The sum of these values is equal to the similarity score.

Examples

Run this code
# NOT RUN {
  # align words
  result<-raw.alignment(c("watu","dat"))
  
  # print the alignment followed by the sim score 
  # for each pair of aligned segments
  cat(result[[3]],result[[4]],sep='\n') 
  ALINE.segments(result)

# }

Run the code above in your browser using DataLab