Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
ValUnifer
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IPIPAN
ValUnifer
Commits
16cd6ffe
Commit
16cd6ffe
authored
1 year ago
by
dcz
Browse files
Options
Downloads
Patches
Plain Diff
log
parent
6c65cd05
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
importer/Argument.py
+2
-0
2 additions, 0 deletions
importer/Argument.py
importer/unification/UnifiedFrameImport.py
+1
-0
1 addition, 0 deletions
importer/unification/UnifiedFrameImport.py
with
3 additions
and
0 deletions
importer/Argument.py
+
2
−
0
View file @
16cd6ffe
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
importer/unification/UnifiedFrameImport.py
+
1
−
0
View file @
16cd6ffe
...
@@ -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
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment