Skip to content

displacy arc labels are place incorrectly in Jupyter notebook #2924

@willprice

Description

@willprice
Software Version
Python 3.6.4
notebook 5.4.1
spacy 2.0.16

The SVG contents is the same when I copy the HTML from the inspector both in
jupyter and from the displacy.serve webpage.

When viewed through displacy.serve:

displacy-serve

And in Jupyter:
displacy jupyter

The SVG generated is the same, so I suspect some CSS issue is overriding the default, I don't know whether that should be solved within Jupyter, or whether it's spaCy's responsibility to make portable SVGs.

Generated SVG here: https://gist.github.com/willprice/66d9ff961b693abe19e94d541eaacb99

This happens both in Firefox and Chrome.

I had a poke twiddling CSS rules off and on but couldn't seem to find any rules that affected the placement. Let me know if there's anything I can do providing additional info to help resolve the issue.

Thanks for the awesome library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBugs and behaviour differing from documentationfeat / visualizersFeature: Built-in displaCy and other visualizersjupyterIssues related to Jupyter notebook environments

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions