An addendum class, for accessing a defined addendum.
SAddendum.name() | Get the name of the addendum. |
SAddendum.description() | Get a description of the addendum. |
SAddendum.language() | Get the addendum language. |
SAddendum.lang_code() | Get the addendum’s ISO 639-2 language code. |
SAddendum.version() | Get the addendum’s version. |
SAddendum.add_word(word, features) | Add a word to the addendum. |
SAddendum.get_word(word, features) | Get a word from the addendum. |
SAddendum.features | Get the features that are defined for the addendum. |
name()
Get the name of the addendum.
Returns: | The addendum name. |
---|---|
Return type: | string |
description()
Get a description of the addendum.
Returns: | The addendum description. |
---|---|
Return type: | string |
language()
Get the addendum language.
Returns: | The addendum language. |
---|---|
Return type: | string |
lang_code()
Get the addendum’s ISO 639-2 language code.
Returns: | The ISO 639-2 language code of the addendum. |
---|---|
Return type: | string |
version()
Get the addendum’s version.
Returns: | The version of the addendum (major, minor). |
---|---|
Return type: | tuple |
add_word(word, features)
Add a word to the addendum.
Parameters: |
|
---|---|
Note : | The addendum takes hold a the features object. |
Note : | The added entry is not saved in the addendum file (not persistent). |
get_word(word, features)
Get a word from the addendum.
Parameters: |
|
---|---|
Returns: | The return value is dependent on the word definition in the addendum, and can be:
As well as a bool value, specifying if the returned list is phones or syllables. If True then syllables were returned, else if False a list of phones were returned. For example: list, syllabified = myaddendum.get_word("hello", None)
|
Return type: | list, bool |
Get the features that are defined for the addendum.
Returns: | A map of the addendum features. |
---|---|
Return type: | SMap |