<commit_before>american_number_system = {
    'zero': 0,
    'one': 1,
    'two': 2,
    'three': 3,
    'four': 4,
    'five': 5,
    'six': 6,
    'seven': 7,
    'eight': 8,
    'nine': 9,
    'ten': 10,
    'twenty': 20,
    'thirty': 30,
    'forty': 40,
    'fifty': 50,
    'sixty': 60,
    'seventy': 70,
    'eighty': 80,
    'ninety': 90,
    'hundred': 100,
    'thousand': 1000,
    'million': 1000000,
    'billion': 1000000000
}

#TODO
indian_number_system = {
    'zero': 0,
    'one': 1,
    'two': 2,
    'three': 3,
    'four': 4,
    'five': 5,
    'six': 6,
    'seven': 7,
    'eight': 8,
    'nine': 9,
    'ten': 10,
    'twenty': 20,
    'thirty': 30,
    'forty': 40,
    'fifty': 50,
    'sixty': 60,
    'seventy': 70,
    'eighty': 80,
    'ninety': 90,
    'hundred': 100,
    'thousand': 1000,
    'lac': 100000,
    'lakh': 100000,
    'crore': 10000000
}

def word_to_num(number_sentence):
    split_words = number_sentence.split()  # split sentence into words
    clean_numbers = []  # removing and, & etc.
    for word in split_words:
        if word in american_number_system:
            clean_numbers.append(word)

    billion_index = clean_numbers.index('billion') if 'billion' in clean_numbers else -1
    million_index = clean_numbers.index('million') if 'million' in clean_numbers else -1
    thousand_index = clean_numbers.index('thousand') if 'thousand' in clean_numbers else -1

    total_sum = 0
    if billion_index>-1 :
        billion_multiplier = number_formation(clean_numbers[0:billion_index])
        # print "billion_multiplier",str(billion_multiplier)
        total_sum += billion_multiplier * 1000000000

    if million_index>-1 :
        if billion_index>-1:
            million_multiplier = number_formation(clean_numbers[billion_index+1:million_index])<commit_msg>added lower case conversion to user input<commit_after>american_number_system = {
    'zero': 0,
    'one': 1,
    'two': 2,
    'three': 3,
    'four': 4,
    'five': 5,
    'six': 6,
    'seven': 7,
    'eight': 8,
    'nine': 9,
    'ten': 10,
    'twenty': 20,
    'thirty': 30,
    'forty': 40,
    'fifty': 50,
    'sixty': 60,
    'seventy': 70,
    'eighty': 80,
    'ninety': 90,
    'hundred': 100,
    'thousand': 1000,
    'million': 1000000,
    'billion': 1000000000
}

#TODO
indian_number_system = {
    'zero': 0,
    'one': 1,
    'two': 2,
    'three': 3,
    'four': 4,
    'five': 5,
    'six': 6,
    'seven': 7,
    'eight': 8,
    'nine': 9,
    'ten': 10,
    'twenty': 20,
    'thirty': 30,
    'forty': 40,
    'fifty': 50,
    'sixty': 60,
    'seventy': 70,
    'eighty': 80,
    'ninety': 90,
    'hundred': 100,
    'thousand': 1000,
    'lac': 100000,
    'lakh': 100000,
    'crore': 10000000
}

def word_to_num(number_sentence):
    number_sentence = number_sentence.lower()
    split_words = number_sentence.split()  # split sentence into words
    clean_numbers = []  # removing and, & etc.
    for word in split_words:
        if word in american_number_system:
            clean_numbers.append(word)

    billion_index = clean_numbers.index('billion') if 'billion' in clean_numbers else -1
    million_index = clean_numbers.index('million') if 'million' in clean_numbers else -1
    thousand_index = clean_numbers.index('thousand') if 'thousand' in clean_numbers else -1

    total_sum = 0
    if billion_index>-1 :
        billion_multiplier = number_formation(clean_numbers[0:billion_index])
        # print "billion_multiplier",str(billion_multiplier)
        total_sum += billion_multiplier * 1000000000

    if million_index>-1 :
        if billion_index>-1:
            million_multiplier = number_formation(clean_numbers[billion_index+1:million_index])
{'fraction_non_alphanumeric': 0.1490048413125336, 'fraction_numerical': 0.06777837547068316, 'mean_word_length': 2.7527749747729566, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 6, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6040169', 'n_tokens_mistral': 1629, 'n_tokens_neox': 1328, 'n_words': 325}