An phoneset class, for accessing a defined phoneset.
SPhoneset.name() | Get the name of the phoneset. |
SPhoneset.description() | Get a description of the phoneset. |
SPhoneset.language() | Get the phoneset language. |
SPhoneset.lang_code() | Get the phoneset’s ISO 639-2 language code. |
SPhoneset.version() | Get the phoneset’s version. |
SPhoneset.phone_has_feature(phone, feature) | Query if the phone in the phoneset has the named feature. |
SPhoneset.has_phone(phone) | Query if the phone is present in the phoneset. |
SPhoneset.features | Get the features that are defined for the phoneset. |
name()
Get the name of the phoneset.
Returns: | The phoneset name. |
---|---|
Return type: | string |
description()
Get a description of the phoneset.
Returns: | The phoneset description. |
---|---|
Return type: | string |
language()
Get the phoneset language.
Returns: | The phoneset language. |
---|---|
Return type: | string |
lang_code()
Get the phoneset’s ISO 639-2 language code.
Returns: | The ISO 639-2 language code of the phoneset. |
---|---|
Return type: | string |
version()
Get the phoneset’s version.
Returns: | The version of the phoneset (major, minor). |
---|---|
Return type: | tuple |
phone_has_feature(phone, feature)
Query if the phone in the phoneset has the named feature. The phones in the phoneset have binary features, i.e. a phone either has a specific named feature or it doesn’t.
Parameters: |
|
---|---|
Returns: | True if the feature is defined for the given phone, else False. If the given phone is not in the phoneset then False is returned. |
Return type: | bool |
has_phone(phone)
Query if the phone is present in the phoneset.
Parameters: | phone (string) – The phone for which the query is done. |
---|---|
Returns: | True if the phone is defined in the phoneset , else False. |
Return type: | bool |
Get the features that are defined for the phoneset.
Returns: | A map of the phoneset features. |
---|---|
Return type: | SMap |
See also