Sound Classes (sound_classes)

This module provides functions and classes to deal with sound-class sequences. Sound classes go back to an approach Dolgopolsky1964. The basic idea behind sound classes is to reduce the IPA space of possible phonetic segments in order to guarantee both the comparability of sounds between languages, but also to give some assessment regarding the probability that sounds belonging to the same class occur in correspondence relations in genetically related languages. More recently, sound classes have been applied in a couple of approaches, including phonetic alignment (see List2012a), and automatic cognate detection (see Turchin2012, List2012b).


ipa2tokens(istring, **keywords) Tokenize IPA-encoded strings.
tokens2class(tstring, model, **keywords) Convert tokenized IPA strings into their respective class strings.
prosodic_string(string[, _output]) Create a prosodic string of the sonority profile of a sequence.
prosodic_weights(prostring[, _transform]) Calculate prosodic weights for each position of a sequence.
class2tokens(tokens, classes[, gap_char, local]) Turn aligned sound-class sequences into an aligned sequences of IPA tokens.
pid(almA, almB[, mode]) Calculate the Percentage Identity (PID) score for aligned sequence pairs.
get_all_ngrams(sequence[, sort]) Function returns all possible n-grams of a given sequence.
sampa2uni(seq) Convert sequence in IPA-sampa-format to IPA-unicode.


Model(model[, path]) Class for the handling of sound-class models.