mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-24 08:14:15 +03:00
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",
|
"from negspacy.negation import Negex",
|
||||||
"",
|
"",
|
||||||
"nlp = spacy.load(\"en_core_web_sm\")",
|
"nlp = spacy.load(\"en_core_web_sm\")",
|
||||||
"negex = Negex(nlp, ent_types=[\"PERSON','ORG\"])",
|
"nlp.add_pipe(\"negex\", config={\"ent_types\":[\"PERSON\",\"ORG\"]})",
|
||||||
"nlp.add_pipe(negex, last=True)",
|
|
||||||
"",
|
"",
|
||||||
"doc = nlp(\"She does not like Steve Jobs but likes Apple products.\")",
|
"doc = nlp(\"She does not like Steve Jobs but likes Apple products.\")",
|
||||||
"for e in doc.ents:",
|
"for e in doc.ents:",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user