Skip to content
Snippets Groups Projects
Commit 16cd6ffe authored by dcz's avatar dcz
Browse files

log

parent 6c65cd05
Branches
Tags
No related merge requests found
...@@ -106,7 +106,9 @@ class SemanticRole: ...@@ -106,7 +106,9 @@ class SemanticRole:
attribute = semantics.models.RoleAttribute.objects.get(attribute=self._attribute) attribute = semantics.models.RoleAttribute.objects.get(attribute=self._attribute)
else: else:
attribute = None attribute = None
print('Find argument_role for semantic_role: {} and attribute {}'.format(role, attribute))
argument_role = semantics.models.ArgumentRole.objects.get(role=role, attribute=attribute, sub_attribute=None) argument_role = semantics.models.ArgumentRole.objects.get(role=role, attribute=attribute, sub_attribute=None)
print('Found argument_role: {}'.format(argument_role))
return argument_role return argument_role
def __str__(self): def __str__(self):
......
...@@ -46,6 +46,7 @@ class UnifiedFrameImport: ...@@ -46,6 +46,7 @@ class UnifiedFrameImport:
for semantic_role in semantic_roles: for semantic_role in semantic_roles:
semantic_roles_obj = semantic_role.store() semantic_roles_obj = semantic_role.store()
semantic_roles_obj.save() semantic_roles_obj.save()
print('Assign semantic_role {} to argument id {}'.format(semantic_roles_obj.role.role, argument.pk))
argument.proposed_roles.add(semantic_roles_obj) argument.proposed_roles.add(semantic_roles_obj)
argument.save() argument.save()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment