Merge pull request #9081 from mjhajharia/patch-1

benepar usage example has deprecated imports
This commit is contained in:
Paul O'Leary McCann 2021-08-29 14:41:52 +09:00 committed by GitHub
commit 6ff8d90070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -2064,11 +2064,9 @@
"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'))",
"import benepar, spacy",
"nlp = spacy.load('en_core_web_md')",
"nlp.add_pipe('benepar', config={'model': 'benepar_en3'})",
"doc = nlp('The time for action is now. It is never too late to do something.')",
"sent = list(doc.sents)[0]",
"print(sent._.parse_string)",