spaCy icon indicating copy to clipboard operation
spaCy copied to clipboard

displaCy dependency tree labels backwards (and upside down) in RTL languages in certain browsers

Open erip opened this issue 5 years ago • 4 comments

How to reproduce the behaviour

Reproducing this is difficult without a depencency parse available for an RTL language, but I've included a link to HTML with the errant RTL. The link is here.

Your Environment

Info about spaCy

  • spaCy version: 2.2.3
  • Platform: Darwin-19.2.0-x86_64-i386-64bit
  • Python version: 3.6.7

erip avatar Dec 30 '19 19:12 erip

Err, interestingly the dependency edges are labeled "correctly" in the raw HTML, so this looks like it might be out of scope for spaCy... I'm not sure, though. This is very strange. :-)

erip avatar Dec 30 '19 19:12 erip

The labels look fine in Firefox, but not in Chrome or Safari. It looks like side compatibility -- I'll let you all decide if it's something you'd like to keep as an issue.

erip avatar Dec 30 '19 21:12 erip

@erip Thanks for getting to the bottom of this – I guess I didn't check the compatibility carefully enough. (I do remember spending a lot of time reading up on RTL support in SVG, so it's kinda annoying I missed this.)

I'll see if we can find a workaround. If nothing else, I wonder if just rotating the path by 180 degrees could work? 🤔

ines avatar Jan 10 '20 16:01 ines

For reference, here's a screenshot from Chrome on Linux.

2021-05-24T17-54-31

Given that time has passed and there's been no expansion of support it seems unlikely this will be supported in other browsers...

https://caniuse.com/mdn-svg_elements_textpath_side

polm avatar May 24 '21 08:05 polm