bogo package

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']
bogo.utils.change_case(string, case)[source]

Helper: Return new string obtained from change the given string to desired case.

Args
string case - 0: lower, 1: upper
bogo.utils.is_vowel(char)[source]
bogo.utils.join(alist)[source]
bogo.utils.separate(string)[source]

Separate a string into smaller parts: first consonant (or head), vowel, last consonant (if any).

>>> separate('tuong')
['t','uo','ng']
>>> separate('ohmyfkinggod')
['ohmyfkingg','o','d']

bogo.validation module

Module contents