def jacard(str0: str, str1: str) -> float:
    """
    Jacard similarity score between str0 and str1.

    Based on the fraction of matching words that are the same between the two
    strings.

    Parameters
    ----------
    str0 : str
    str1 : str

    Returns
    -------
    similarity : float
        The jacard similarity
    """
    words0 = set(str0.split())
    words1 = set(str1.split())
    shared_words = len(words0.intersection(words1))
    all_words = len(words0.union(words1))

    if all_words == 0:
        return 0.0
    return shared_words/all_words