From 3913e18201102e6a9fb6581e1b928c3947ed198a Mon Sep 17 00:00:00 2001 From: ines Date: Wed, 30 May 2018 13:31:28 +0200 Subject: [PATCH 1/3] Add self-attentive-parser to universe (see #59) --- website/universe/universe.json | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/website/universe/universe.json b/website/universe/universe.json index 21ec0177c..3ea4b0a21 100644 --- a/website/universe/universe.json +++ b/website/universe/universe.json @@ -872,8 +872,36 @@ }, "category": ["standalone"], "tags": [ "question-answering", "elasticsearch"] + }, + { + "id": "self-attentive-parser", + "title": "Berkeley Neural Parser", + "slogan": "Constituency Parsing with a Self-Attentive Encoder (ACL 2018)", + "description": "A Python implementation of the parsers described in *\"Constituency Parsing with a Self-Attentive Encoder\"* from ACL 2018.", + "url": "https://arxiv.org/abs/1805.01052", + "github": "nikitakit/self-attentive-parser", + "pip": "benepar", + "code_example": [ + "import spacy", + "from benepar.spacy_plugin import BeneparComponent", + "nlp = spacy.load('en')", + "nlp.add_pipe(BeneparComponent('benepar_en'))", + "doc = nlp(u'The time for action is now. It's never too late to do something.')", + "sent = list(doc.sents)[0]", + "print(sent._.parse_string)", + "# (S (NP (NP (DT The) (NN time)) (PP (IN for) (NP (NN action)))) (VP (VBZ is) (ADVP (RB now))) (. .))", + "print(sent._.labels)", + "# ('S',)", + "print(list(sent._.children)[0])", + "# The time for action" + ], + "author": "Nikita Kitaev", + "author_links": { + "github": "nikitakit", + "website": " http://kitaev.io" + }, + "category": ["research", "pipeline"] } - ], "projectCats": { "pipeline": { From 0baaf836cf2d1a57be97ffe64750396799bd2198 Mon Sep 17 00:00:00 2001 From: ines Date: Wed, 30 May 2018 13:32:49 +0200 Subject: [PATCH 2/3] Update formatting [ci skip] --- website/universe/universe.json | 1 + 1 file changed, 1 insertion(+) diff --git a/website/universe/universe.json b/website/universe/universe.json index 3ea4b0a21..3910785e4 100644 --- a/website/universe/universe.json +++ b/website/universe/universe.json @@ -884,6 +884,7 @@ "code_example": [ "import spacy", "from benepar.spacy_plugin import BeneparComponent", + "", "nlp = spacy.load('en')", "nlp.add_pipe(BeneparComponent('benepar_en'))", "doc = nlp(u'The time for action is now. It's never too late to do something.')", From b8ef9c1000696541df4366bfaacfdf71938595db Mon Sep 17 00:00:00 2001 From: ines Date: Wed, 30 May 2018 14:10:20 +0200 Subject: [PATCH 3/3] Fix model names in conftest (see #2379) --- spacy/tests/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/tests/conftest.py b/spacy/tests/conftest.py index afb3ad5cd..f703489e3 100644 --- a/spacy/tests/conftest.py +++ b/spacy/tests/conftest.py @@ -18,9 +18,9 @@ _languages = ['bn', 'da', 'de', 'en', 'es', 'fi', 'fr', 'ga', 'he', 'hu', 'id', 'it', 'nb', 'nl', 'pl', 'pt', 'ro', 'ru', 'sv', 'tr', 'ar', 'xx'] _models = {'en': ['en_core_web_sm'], - 'de': ['de_core_news_md'], + 'de': ['de_core_news_sm'], 'fr': ['fr_core_news_sm'], - 'xx': ['xx_ent_web_md'], + 'xx': ['xx_ent_web_sm'], 'en_core_web_md': ['en_core_web_md'], 'es_core_news_md': ['es_core_news_md']}