Update negspacy example code for spaCy 3.0 (#8022)

This commit is contained in:
Jeno Pizarro 2021-05-07 03:33:21 -04:00 committed by svlandeg
parent 46311cf03f
commit 7cc8df1a28

View File

@ -2375,8 +2375,7 @@
"from negspacy.negation import Negex",
"",
"nlp = spacy.load(\"en_core_web_sm\")",
"negex = Negex(nlp, ent_types=[\"PERSON','ORG\"])",
"nlp.add_pipe(negex, last=True)",
"nlp.add_pipe(\"negex\", config={\"ent_types\":[\"PERSON\",\"ORG\"]})",
"",
"doc = nlp(\"She does not like Steve Jobs but likes Apple products.\")",
"for e in doc.ents:",