Position of a node
See original GitHub issueHi Goodman.
Does the penman library have a method to return the position of each node in the graph? Ex.
(w / want-01 :ARG0 (b / boy) :ARG1 (g / go-01 : ARG0 b))
want-01 - 0
boy - 0.0
go-01 - 0.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
Position Node — Blender Manual
Position node. The Position node outputs a vector of each point of the geometry the node is connected to. The node can work...
Read more >Position Node - Foundry Learn
The Position node outputs position information in 3D space. Using the 3D node on its own is not useful as it only shows...
Read more >17.2.1 Nodes and node positions
There are two basic kinds of satellite nodes: geostationary and non-geostationary satellite nodes. In addition, terminal nodes can be placed on the Earth's ......
Read more >Find Level wise positions of given node in a given Binary Tree
Perform level order traversal of given Binary Tree using Queue. Keep track of level count and the count of nodes from left to...
Read more >Setting the position of a node - IBM
Use the IBM® Integration API to set the position of a node on the canvas in the Application Development view. Set the position...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok, I’ve reconsidered this and changed
Tree.positions()
toTree.walk()
which yields paths to branches. That is, it should yield one pair for every branch in the tree structure. This is still not exactly the same as the alignment annotations, but this is more general and should be able to be applied to alignment annotation conversion. Here’s an example:Note that the top node doesn’t have an index, because these are indices of branches. They are 0-based but the concept is included as a branch, so it looks like 1-based indices. Here’s an example of how you could get most of the way to the alignment metadata format:
To get the rest of the way would require parsing the alignment info from the roles or concepts. The AlignmentMarker.from_string() function would help here. Also one would need to consider role alignments on branches whose target is not atomic.
@rafaelanchieta does this look better?
It’s great. I’ll close the issue.