This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from benepar.spacy_plugin import BeneparComponent | |
# Loading spaCy’s en model and adding benepar model to its pipeline | |
nlp = spacy.load('en') | |
nlp.add_pipe(BeneparComponent('benepar_en2')) | |
text='It took me more than two hours to translate a few pages of English.' | |
# Generating a parse tree for the text | |
list(nlp(text).sents)[0]._.parse_string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment