def jaccard_word_level_similarity(y_true: str, y_pred: str) -> float:
    """
    Compute word level Jaccard similarity

    Parameters
    ----------
    y_true : str
        True text
    y_pred : str
        Predicted text

    Returns
    -------
    float
        Word level Jaccard similarity

    Examples
    --------
    >>> from evaluations.text_extraction import jaccard_word_level_similarity
    >>> assert jaccard_word_level_similarity(
    ...         "Be happy my friend",
    ...         "be happy"
    ...     )
    0.5
    """
    true_set = set(y_true.lower().split())
    pred_set = set(y_pred.lower().split())
    y_intersect = true_set.intersection(pred_set)
    return len(y_intersect) / (len(true_set) + len(pred_set) - len(y_intersect))