Arithmetic for Phones and Features
In [1]:
from phones import PhoneCollection
pc = PhoneCollection()
Phones in this library support arithmetic operations. Please note that this is fairly slow when not filtering by language and/or dialect.
In [2]:
(pc.phones("ø").val + pc.phones("o").val)[0]
Out[2]:
PhoneFeatures¶
Using a PhoneFeature
, individual features can be altered.
In [3]:
from phones.features import PhoneFeature
In [4]:
(pc.phones("ʉ").val + PhoneFeature("back", 1))[0]
Out[4]:
In [5]:
(pc.phones("ʉ").val - PhoneFeature("round", 1))[0]
Out[5]:
Listing Features¶
In [6]:
pc.features
Out[6]: