(anaphor, antecedent)
return "tokens_contained", contained
Compute whether one mention is a substring of the other mention.

    Args:
        anaphor (Mention): A mention.
        antecedent (Mention): Another mention, preceding the anaphor.

    Returns:
        The tuple ('tokens_contained', CONTAINED), where CONTAINED is True if
        the anaphor contains the antecedent, or vice versa (ignoring case).
Compute whether one mention is a substring of the other mention.
Compute whether one mention is a substring of the other mention .
def tokens_contained(anaphor, antecedent):
    """ Compute whether one mention is a substring of the other mention.

    Args:
        anaphor (Mention): A mention.
        antecedent (Mention): Another mention, preceding the anaphor.

    Returns:
        The tuple ('tokens_contained', CONTAINED), where CONTAINED is True if
        the anaphor contains the antecedent, or vice versa (ignoring case).
    """
    ana_tokens = anaphor.attributes["tokens_as_lowercase_string"]
    ante_tokens = antecedent.attributes["tokens_as_lowercase_string"]

    contained = ana_tokens in ante_tokens or ante_tokens in ana_tokens

    return "tokens_contained", contained
def tokens_contained ( anaphor , antecedent ) : ana_tokens = anaphor . attributes [ "tokens_as_lowercase_string" ] ante_tokens = antecedent . attributes [ "tokens_as_lowercase_string" ] contained = ana_tokens in ante_tokens or ante_tokens in ana_tokens return "tokens_contained" , contained