LingPy

This documentation is for version 2.0.dev, which is not released yet.

lingpy.sequence.sound_classes.tokens2class

lingpy.sequence.sound_classes.tokens2class(tstring, model, stress="ˈˌ'")

Convert tokenized IPA strings into their respective class strings.

Parameters :

tokens : list

A list of tokens as they are returned from ipa2tokens().

model : Model

A Model object.

Returns :

classes : string

A sound-class representation of the tokenized IPA string.

Examples

>>> from lingpy import *
>>> tokens = ipa2tokens('t͡sɔyɡə')
>>> classes = tokens2class(tokens,sca)
>>> print(classes)
CUKE

This Page