def indexes_from_sentence(lang, sentence):
    """Extract all indices from a sentence

    Args:
        lang (Language): Language object from which sentence is derived
        sentence (list::string): List of words in sentence
    Returns:
        (list::int) List of integers representing sentence
    """
    return [lang.word2index[word] for word in sentence.split(' ')]