def METHOD_NAME(nlp_doc):
    negation_tokens = list(filter(lambda tok: tok.dep_ == "neg", nlp_doc))
    negated_entities = list(filter(lambda tok: tok._.negex, nlp_doc.ents))
    return {
        "negation_words": len(negation_tokens),
        "negated_entities": len(negated_entities)}