spaCy
spaCy copied to clipboard
displaCy dependency tree labels backwards (and upside down) in RTL languages in certain browsers
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
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. :-)
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 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? 🤔
For reference, here's a screenshot from Chrome on Linux.

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