def get_last_n_features(feature, current_words, idx, n=3):
    """For the purposes of timing info, get the timing, word or pos
    values  of the last n words (default = 3).
    """
    if feature == "words":
        position = 0
    elif feature == "POS":
        position = 1
    elif feature == "timings":
        position = 2
    else:
        raise Exception("Unknown feature {}".format(feature))
    start = max(0, (idx - n) + 1)
    # print start, idx + 1
    return [triple[position] for triple in
            current_words[start: idx + 1]]