mirror of https://github.com/explosion/spaCy.git
Update negspacy example code for spaCy 3.0 (#8022)
This commit is contained in:
parent
6788d90f61
commit
5cf76ab608
|
@ -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:",
|
||||
|
|
Loading…
Reference in New Issue