ALINE http://webdocs.cs.ualberta.ca/~kondrak/ Copyright 2002 by Grzegorz Kondrak.
ALINE is an algorithm for aligning phonetic sequences, described in [1]. This module is a port of Kondrak's (2002) ALINE. It provides functions for phonetic sequence alignment and similarity analysis. These are useful in historical linguistics, sociolinguistics and synchronic phonology.
ALINE has parameters that can be tuned for desired output. These parameters are: - C_skip, C_sub, C_exp, C_vwl - Salience weights - Segmental features
In this implementation, some parameters have been changed from their default values as described in [1], in order to replicate published results. All changes are noted in comments.
Example usage
# Get optimal alignment of two phonetic sequences
>>> align('θin', 'tenwis') # doctest: +SKIP [[('θ', 't'), ('i', 'e'), ('n', 'n'), ('-', 'w'), ('-', 'i'), ('-', 's')]]
[1] G. Kondrak. Algorithms for Language Reconstruction. PhD dissertation, University of Toronto.
Function | align |
Compute the alignment of two phonetic strings. |
Function | delta |
Return weighted sum of difference between P and Q. |
Function | demo |
A demonstration of the result of aligning phonetic sequences used in Kondrak's (2002) dissertation. |
Function | diff |
Returns difference between phonetic segments P and Q for feature F. |
Function | R |
Return relevant features for segment comparsion. |
Function | sigma |
Returns score of an expansion/compression. |
Function | sigma |
Returns score of an indel of P. |
Function | sigma |
Returns score of a substitution of P with Q. |
Function | V |
Return vowel weight if P is vowel. |
Variable |
|
Undocumented |
Variable |
|
Undocumented |
Variable |
|
Undocumented |
Variable |
|
Undocumented |
Variable | cognate |
Undocumented |
Variable | consonants |
Undocumented |
Variable | feature |
Undocumented |
Variable | inf |
Undocumented |
Variable |
|
Undocumented |
Variable |
|
Undocumented |
Variable | salience |
Undocumented |
Variable | similarity |
Undocumented |
Function | _retrieve |
Retrieve the path through the similarity matrix S starting at (i, j). |
Compute the alignment of two phonetic strings.
(Kondrak 2002: 51)
Parameters | |
str1 | Undocumented |
str2 | Undocumented |
epsilon:float (0.0 to 1.0) | Adjusts threshold similarity score for near-optimal alignments |
str1, str2:str | Two strings to be aligned |
Returns | |
Alignment(s) of str1 and str2 | |
Unknown Field: rtpye | |
list(list(tuple(str, str))) |