From 5cf76ab60821ec3fb7165070a190976ef7e9eac5 Mon Sep 17 00:00:00 2001 From: Jeno Pizarro Date: Fri, 7 May 2021 03:33:21 -0400 Subject: [PATCH] Update negspacy example code for spaCy 3.0 (#8022) --- website/meta/universe.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/website/meta/universe.json b/website/meta/universe.json index 0fcc1379f..721de1eb5 100644 --- a/website/meta/universe.json +++ b/website/meta/universe.json @@ -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:",