def has_overlap(x, y):
    """
    Determines whether the text of two entities overlap. This function is symmetric.
    Returns
    -------
    bool
        True iff text overlaps.
    """
    end_x = x.start + len(x.text)
    end_y = y.start + len(y.text)
    return x.start < end_y and y.start < end_x