def _vectorize_input_string(input_ingredient: str, word_index: dict):
    """
    Converts parsed input ingredient to a list of indexs.
    Where each word is converted into a number

    :param input_ingredients: Ingredient String e.g. "1 red apple"
    :param word_index:
    :return: List of words numeric representations [1, 120, 3]
    """
    # Convert to list of words
    word_list = input_ingredient.split(" ")
    idx_list = []

    # Convert list to indexes - replace with OOV token if not in word list
    for word in word_list:
        if word in word_index:
            idx_list.append(word_index[word])
        else:
            idx_list.append(word_index['<OOV>'])
    return idx_list