from typing import List


def jaccard(preds: List[str], targets: List[str]) -> float:
    """Implementation of the word-level Jaccard index.

    Reference:
    https://www.kaggle.com/c/tweet-sentiment-extraction/overview/evaluation
    """
    correct = 0.0
    for str1, str2 in zip(preds, targets):
        a = set(str1.lower().split())
        b = set(str2.lower().split())
        c = a.intersection(b)
        correct += len(c) / (len(a) + len(b) - len(c))
    return correct / len(preds)