def calculate_total_term_prob(patterns_pgS, term):
    """
    Calculate the total probability for a term
    """
    term_prob = 0
    for pattern in term:
        term_prob += patterns_pgS[pattern]
    return term_prob