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

code error #4

Open
JinfenLi opened this issue Jun 5, 2020 · 0 comments
Open

code error #4

JinfenLi opened this issue Jun 5, 2020 · 0 comments

Comments

@JinfenLi
Copy link

JinfenLi commented Jun 5, 2020

I think
@staticmethod
def __getrelationinfo(lnode, rnode):
""" Get relation information
:type lnode,rnode: SpanNode instance
:param lnode,rnode: Left/Right children nodes
"""
if (lnode.prop == 'Nucleus') and (rnode.prop == 'Nucleus'):
relation = lnode.relation
elif (lnode.prop == 'Nucleus') and (rnode.prop == 'Satellite'):
relation = lnode.relation
elif (lnode.prop == 'Satellite') and (rnode.prop == 'Nucleus'):
relation = rnode.relation
else:
print('lnode.prop = {}, lnode.edu_span = {}'.format(lnode.prop, lnode.edu_span))
print('rnode.prop = {}, lnode.edu_span = {}'.format(rnode.prop, rnode.edu_span))
raise ValueError("Error when find relation for new node")
return relation

should be

@staticmethod
def __getrelationinfo(lnode, rnode):
""" Get relation information
:type lnode,rnode: SpanNode instance
:param lnode,rnode: Left/Right children nodes
"""
if (lnode.prop == 'Nucleus') and (rnode.prop == 'Nucleus'):
relation = lnode.relation
elif (lnode.prop == 'Nucleus') and (rnode.prop == 'Satellite'):
relation = rnode.relation
elif (lnode.prop == 'Satellite') and (rnode.prop == 'Nucleus'):
relation = lnode.relation
else:
print('lnode.prop = {}, lnode.edu_span = {}'.format(lnode.prop, lnode.edu_span))
print('rnode.prop = {}, lnode.edu_span = {}'.format(rnode.prop, rnode.edu_span))
raise ValueError("Error when find relation for new node")
return relation

isn't it?

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

1 participant