Languages

tarakimu.lang

Swahili

Swahili language module.

class tarakimu.lang.sw.Number(number, **kwargs)[source]

Bases: tarakimu.lang.base.AbstractNumber

CONJUNCTION = 'na'
HUNDREDS = ['', 'mia moja', 'mia mbili', 'mia tatu', 'mia nne', 'mia tano', 'mia sita', 'mia saba', 'mia nane', 'mia tisa']
NEGATIVE = 'hasi'
ONES = ['', 'moja', 'mbili', 'tatu', 'nne', 'tano', 'sita', 'saba', 'nane', 'tisa']
POINT = 'nukta'
RANKS = ['', 'elfu', 'milioni', 'bilioni', 'trilioni', 'kuadrilioni', 'kuintilioni', 'seksitilioni', 'septilioni', 'oktilioni', 'nonilioni', 'desilioni', 'anidesilioni', 'dodesilioni', 'tradesilioni', 'kuatuordesilion', 'kuindesilioni', 'seksidesilioni', 'septendesilioni', 'oktodesilioni', 'novemdesilioni', 'vijintilioni']
TENS = ['', 'kumi', 'ishirini', 'thelathini', 'arobaini', 'hamsini', 'sitini', 'sabini', 'themanini', 'tisini']
ZERO = 'sifuri'
classmethod digits_to_words(number)[source]

Get words for each digit in a number

Args:
number (numeric): A whole number
Returns:
str: words for each digit in a number.
classmethod hundreds_to_words(number)[source]

Get a whole number within range less than one thousand in words.

Args:
number (numeric): a numeric value to be converted
Returns
str: numeric value in words.
classmethod short_scale_to_words(number, use_lakh=False)[source]

Get a value within a short scale range of a number in words.

Args:

number (numeric): An integer or a numeric string to be converted.

use_lakh (bool): Use Lakh (Laki) numbering system.
Defaults to False.
Returns:
str: numeric value within numbers short scale in words.
classmethod short_scale_to_words_r(number)[source]

Get a value within the short scale range of a number in words with words representing scale added at the end.

Args:

number (numeric): An integer or a numeric string to be converted.

use_lakh (bool): Use Lakh (Laki) numbering system.
Defaults to False.
Returns:
str: numeric value within numbers short scale in words.
to_words()[source]

Get words representing the instance number.

Returns:
str: number in words.

English

English language module.

class tarakimu.lang.en.Number(number, **kwargs)[source]

Bases: tarakimu.lang.base.AbstractNumber

CONJUNCTION = 'and'
HUNDREDS = ['', 'one hundred', 'two hundred', 'three hundred', 'four hundred', 'five hundred', 'six hundred', 'seven hundred', 'eight hundred', 'nine hundred']
NEGATIVE = 'negative'
ONES = ['', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']
POINT = 'point'
RANKS = ['', 'thousand', 'million', 'billion', 'trillion', 'quadrillion', 'quintillion', 'sextillion', 'septillion', 'octillion', 'nonillion', 'decillion', 'undecillion', 'duodecillion', 'tredecillion', 'quattuordecillion', 'quindecillion', 'sexdecillion', 'septendecillion', 'octodecillion', 'novemdecillion', 'vigintillion']
TEENS = ['', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen']
TENS = ['', 'ten', 'twenty', 'thirty', 'fourty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety']
ZERO = 'zero'
classmethod digits_to_words(number, **kwargs)[source]

Get words for each digit in a number

Args:
number (numeric): A whole number
Returns:
str: words for each digit in a number.
classmethod hundreds_to_words(number)[source]

Get a whole number within range less than one thousand in words.

Args:
number (numeric): a numeric value to be converted
Returns
str: numeric value in words.
classmethod short_scale_to_words(number, use_lakh=False)[source]

Get a value within a short scale range of a number in words.

Args:
number (numeric): An integer or a numeric string to be converted.
Returns:
str: numeric value within numbers short scale in words
to_words()[source]

Get words representing the instance number.

Returns:
str: number in words.