New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken output of displacy #476

Closed
radixvinni opened this Issue Aug 13, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@radixvinni
Copy link

radixvinni commented Aug 13, 2016

Got a messy output while testing the sentence on the displacy.spacy.io. (Lines and arrows are being missed):

Artfully, though shamelessly, he has tried to sell this action as an effort to bring about stability and help fight the war on terror more effectively.

Tried both Chromium 51.0.2704.79\Ubuntu 14.04 (64-bit) and Firefox 47.0

@Ogaday

This comment has been minimized.

Copy link

Ogaday commented Aug 14, 2016

Can confirm the same problem for me (ubuntu 16.04, firefox 48.0). I wonder if it's to do the length of the sentence?

Also, maybe this bug should be crossposted to the spacy-io/displacy repo issue tracker, because I imagine it's related to the visualisation.

@ines might know more.

@ines

This comment has been minimized.

Copy link
Member

ines commented Aug 14, 2016

Good catch, thanks for pointing this out!

There's a known issue with long sentences with no mergeable noun phrases and particularly long arcs, causing displaCy to render the smallest arcs so small that they pretty much disappear. (For comparison, see the same sentence with one small modification: "Artfully, though shamelessly, he has effectively tried to sell this action as an effort to bring about stability and help fight the war on terror.")

Some background on this: The arcs are currently rendered in "levels" (spanning over 1 word, spanning over 2 words etc.). The overall amount of levels is used to calculate the arcs' width and height to make sure they all fit. The bug here is that empty levels aren't stripped in the rendering process, meaning that in this case, it calculated the arrow sizes to fit 20 levels – when in reality, only 6 were used.

This will definitely be fixed in the new version (see my comment in #426), as it will use a much more reliable logic to draw the arcs. In the meantime, I'll see if I can add a quick fix to the current version to solve this particular problem. Also, as I said on the other thread, if there's anything you'd like to see/have fixed in the new version, let me know!

@radixvinni

This comment has been minimized.

Copy link

radixvinni commented Aug 14, 2016

Thank you for your clear and helpful explanation.

@ines ines closed this Oct 20, 2016

@lock

This comment has been minimized.

Copy link

lock bot commented May 9, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 9, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.