Skip to content
Discussion options

You must be logged in to vote

Hi! There's not really an easy way to convert the exported .svg back to the original token format – in order to generate the arcs, the heads/deps information is converted to cubic bezier curves, and the tokens are converted to <text> elements. You can see the implementation here:

class DependencyRenderer:

In theory, you could of course write a function that reverses the exact calculation here, but it's probably a hassle. But if you don't have the original input, you could still reconstruct it from the visualization: the words are the tokens, and their start and end character offsets are the character positions are the off…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zarakolagar120
Comment options

Answer selected by polm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / parser Feature: Dependency Parser feat / visualizers Feature: Built-in displaCy and other visualizers
2 participants