def ids_from_sentence(vocabulary, sentence):
    """
    Convenience method, for converting a sequence of words to ids.
    :param vocabulary: Language, object of the language to use the look up of.
    :param sentence: string, a tokenized sequence of words.
    :return: list, containing the ids (int) of the sentence in the same order.
    """
    return [vocabulary(word.rstrip()) for word in sentence.strip().split() if word.rstrip() != '']