bogo package¶
Subpackages¶
Submodules¶
bogo.accent module¶
bogo.bogo module¶
bogo.mark module¶
bogo.utils module¶
- bogo.utils.append_comps(comps, char)[source]¶
Append a character to comps following this rule: a vowel is added to the vowel part if there is no last consonant, else to the last consonant part; a consonant is added to the first consonant part if there is no vowel, and to the last consonant part if the vowel part is not empty.
>>> transform(['', '', '']) ['c', '', ''] >>> transform(['c', '', ''], '+o') ['c', 'o', ''] >>> transform(['c', 'o', ''], '+n') ['c', 'o', 'n'] >>> transform(['c', 'o', 'n'], '+o') ['c', 'o', 'no']