def jacc_ind(bigrams1, bigrams2):
    """Calculate Jaccard index for 2 bigrams"""
    unin = bigrams1 | bigrams2
    intn = bigrams1 & bigrams2
    if len(unin) == 0: return 0.0
    else: return len(intn) / len(unin)