Skip to content
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

Creating the visual dependency graph from conll data #34

Open
sambaPython24 opened this issue Sep 18, 2022 · 1 comment
Open

Creating the visual dependency graph from conll data #34

sambaPython24 opened this issue Sep 18, 2022 · 1 comment

Comments

@sambaPython24
Copy link

sambaPython24 commented Sep 18, 2022

Hello,
the parser works great and I would like to reproduce the dependency graph
that I saw in your example.
image

I am using the docker image and tried the option "conll" and "graphical" as an output.
"graphical" seems to include the svg file but I would like to understand how to find the hierarchical arrows between the different words based on the "conll" data (not just the final image, but in some kind of hierarchical structure.)

@rsennrich
Copy link
Owner

rsennrich commented Sep 19, 2022

The tree structure can be recovered from the conll formatted output. In the conll output, the head position of each word is given in column 7 - words with head position 0 form the top-level roots. For all other positions, there will be an dependency arc (arrow) from the head to that position. To find out what level in the tree you are in, you count how many arcs it takes to reach a root.

you can also check the code that converts conll files into the SVG images: https://github.com/rsennrich/ParZu/tree/master/postprocessor/DepSVG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants