def index_corpus(tokenized_corpus, vocab):
    """Corpus Indexer
    This function indexes the given tokenized corpus from its vocabulary.
    
    
    Args:
       tokenized_corpus (:obj:`list` of :obj:`list`): The tokenized corpus (list of lists).
       vocab (:obj:`list` of :obj:`tupple`): The vocabulary of the corpus.

    Returns:
       :obj:`list` of :obj:`list`: the indexed corpus.

    """
    vocab_indexer = dict([(word[0], i) for i, word in enumerate(vocab)])
    for i, sentence in enumerate(tokenized_corpus):
        tokenized_corpus[i] = [vocab_indexer[word] for word in sentence]
    return tokenized_corpus