def match_all_attrs(token, attrs_to_match):
    """
    Return true if all the values in the given dict match the morphology attributes of the token.  So attrs_to_match
    is a way of filtering out which tokens will be matched.
    Returns true for an empty dict.
    :param token:
    :param attrs_to_match:
    :return:
    """
    if attrs_to_match is None:
        return True
    token_attrs = token.morph.to_dict()
    for attr in attrs_to_match:
        if attr not in token_attrs or attrs_to_match[attr] != token_attrs[attr]:
            return False
    return True