def score_tup(t):
    """
    Score an ngram tuple returned from a database ngram table. A higher scoring
    term is more deserving of inclusion in the resulting acrostic
    :param t: (Term string, initials string, Corpus count, Used count)
    :return: Fitness score for this term
    """
    term = t[0]
    inits = t[1]
    pop = t[2]
    used = t[3]
    raw = (len(term)*pop/(10*used*used*used))**(len(inits))
    if "#" in term:
        score = 2*raw
    else:
        score = raw
    return max(score, 1)