def accuracy(reference, test):
    if len(reference) != len(test):
        raise ValueError("Lists must have the same length.")
    return sum(x == y for x, y in izip(reference, test)) / len(test)
Given a list of reference values and a corresponding list of test
dataset/ETHPy150Open nltk/nltk/nltk/metrics/scores.py/accuracy