def get_jac_idx(s1, s2):
    """ Get Jaccard index.

    :param s1: word set 1
    :param s2: word set 2
    :return: whether both of the sets are empty and Jaccard index
    """

    if len(s1) == 0 and len(s2) == 0:
        return True, 1.0

    inter = s1 & s2
    union = s1 | s2
    return False, len(inter) / len(union)