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 GitHub
parent 6788d90f61
commit 5cf76ab608
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

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:",