def use_ordinal_numbers(lvl_num, lvl_type): # Use ordinal words (first, second, third) or numbers (1st, 2nd, 3rd)? lvl_num = choose( lambda: lookups.num2word(lvl_num, output='ordinal_words'), lambda: lookups.num2word(lvl_num, output='ordinal')) lvl_num = labels(lvl_num, 'level_number') return join_str_and_labels([lvl_num, lvl_type], sep=lambda: random_separator( 1, 3, possible_sep_chars=None))
def use_cardinal_numbers(lvl_num, lvl_type): # Treat level 1 as GROUND? if lvl_num == 1: lvl_num = choose(lambda: "GROUND", lambda: 1) else: lvl_num = lookups.num2word(lvl_num, output='cardinal') lvl_num = labels(lvl_num, 'level_number') return join_str_and_labels([lvl_type, lvl_num], sep=lambda: random_separator( 1, 3, possible_sep_chars=None))