Word

sequences.word_and_phone.Word(self, interval=(None, None, None), *, Interval=None)

A Word subclass of SequenceInterval

Has all the same methods and attributes as SequenceInterval in addition to attributes described below.
superset_class set to Top, and subset_class set to Phone

Parameters

Name Type Description Default
interval list | tuple | Interval | SequenceInterval A tuple or list of start, end and label, or another SequenceInterval (None, None, None)

Examples

from aligned_textgrid import Word, Phone

DH = Phone((0, 1, "DH"))
AH0 = Phone((1, 2, "AH0"))

THE = Word((0, 2, "THE"))

THE.set_phones([DH, AH0])

print(THE.phones)
['DH', 'AH0']

Attributes

Name Type Description
phone_list list[Phone] A list of Phone objects
phones list[str] A list of phone labels

Methods

Name Description
set_phones Convenience function to set the phones

set_phones

sequences.word_and_phone.Word.set_phones(phone_list)

Convenience function to set the phones

Parameters

Name Type Description Default
phone_list list[Phone] List of Phone instances required

Reuse

GPLv3