I am following instruction on https://spacy.io/usage/visualizers and tried to visualise the dependency parse with the following code on both Jupyter Notebook and Spyder:
import spacy
from spacy import displacy
nlp = spacy.load('en')
doc = nlp(u'This is a sentence.')
displacy.serve(doc, style='dep')
and the output shows:
Serving on port 5000...
Using the 'dep' visualizer
Can anyone tell me if I am missing something here?
I am using Window 10, Visual Studio 2015, and the virtual environment that is running this is set up through Anaconda. Thanks in advance
displacy.serve
– instead, you can usedisplacy.render
. If the visualisation doesn't show up correctly, you can setjupyter=True
to force Jupyter-style rendering. – Rosenberger