Skip to content

Conversation

Entenzahn
Copy link

Changes to the tuw-nlp system for dealing with marked relationship entities in graph representations.
The algorithm assumes that nodes come with the "entity" attribute and an integer of 1 or 2 to signal membership.

n1_root = [n for n, d in n1.in_degree() if d == 0][0]
n2_root = [n for n, d in n2.in_degree() if d == 0][0]
# This is a temporary fix. Should be d==0 for both.
n1_root = [n for n, d in n1.in_degree() if d < 2][0]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed this as a workaround solution for using the path() function with entities. Particularly, if I want to look for a path to or from any arbitrary entity 1, the penman code looks like this: ( .* / u-1 :entity (e_1 / 1 )). This seems to create a single node subgraph with one edge. The list returned by this comprehension is therefore empty, and the reference to element 0 will throw an exception. The same workaround is included in the path_between function

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

Successfully merging this pull request may close these issues.

1 participant