def position_of_ngram(ngram, sentence):
    # Iterates through the ngrams in sentence.
    for i,sublist in enumerate(ngrams(sentence, len(ngram))):
        # Returns the index of the word when ngram matches.
        if ngram == sublist:
            return i
This function returns the position of the first instance of the ngram 
dataset/ETHPy150Open nltk/nltk/nltk/translate/ribes_score.py/position_of_ngram