Simple dependency visualizer
Project description
deplacy
Simple dependency visualizer for spaCy.
Basic usage with spaCy
>>> import spacy
>>> nlp=spacy.load("en_core_web_sm")
>>> doc=nlp("I saw three ships")
>>> import deplacy
>>> deplacy.render(doc)
I PRON <┐ nsubj
saw VERB ─┴─┐ ROOT
three NUM <┐ │ nummod
ships NOUN ─┘<┘ dobj
>>> deplacy.render(doc,2)
I PRON <┐ nsubj
saw VERB ─┴─┐ ROOT
three NUM <┐ │ nummod
ships NOUN ─┘ <┘ dobj
deplacy.render(doc,BoxDrawingWidth=1,file=None)
renders doc
on a terminal. For old terminals, whose Box Drawing characters are "fullwidth", BoxDrawingWidth=2
nicely works.
Install
pip install deplacy
You need to install spaCy separately.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.