Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
ValUnifer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IPIPAN
ValUnifer
Commits
fa5d1086
Commit
fa5d1086
authored
Aug 30, 2023
by
dcz
Browse files
Options
Downloads
Patches
Plain Diff
Schemata alternation bugfix
parent
1fa58da1
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/components/unification/shared/frame-components/SemanticsSchemataComponent.vue
+159
-161
159 additions, 161 deletions
...on/shared/frame-components/SemanticsSchemataComponent.vue
with
159 additions
and
161 deletions
frontend/src/components/unification/shared/frame-components/SemanticsSchemataComponent.vue
+
159
−
161
View file @
fa5d1086
...
...
@@ -34,26 +34,18 @@ export default {
getSchemataPositionCnt
(
schema
)
{
return
schema
.
positions
.
length
;
},
getRealisationDescriptions
(
schema
)
{
getRealisationDescriptions
(
schema
,
alternation_id
)
{
const
alternationDescList
=
[];
if
(
this
.
alternations
)
{
const
curr_alternations
=
this
.
alternations
[
this
.
frame
.
id
][
schema
.
id
];
const
curr_realisation_descriptions
=
this
.
realisation_descriptions
[
this
.
frame
.
id
][
schema
.
id
];
for
(
let
i
in
curr_alternations
)
{
alternationDescList
.
push
(
curr_realisation_descriptions
[
i
]);
}
alternationDescList
.
push
(
this
.
realisation_descriptions
[
this
.
frame
.
id
][
schema
.
id
][
alternation_id
]);
}
return
'
<i>
'
+
alternationDescList
+
'
</i>
'
;
},
getPhraseCss
(
schema
,
posi
tion
)
{
getPhraseCss
(
position
,
alterna
tion
)
{
const
styles
=
[];
if
(
this
.
alternations
)
{
const
argumentIdSet
=
new
Set
();
const
curr_alternations
=
this
.
alternations
[
this
.
frame
.
id
][
schema
.
id
];
for
(
let
i
in
curr_alternations
)
{
const
alternation
=
curr_alternations
[
i
]
for
(
let
arg_id
in
alternation
)
{
const
phrase_ids
=
alternation
[
arg_id
];
phrase_ids
.
forEach
(
phrase_id
=>
{
...
...
@@ -62,7 +54,6 @@ export default {
}
});
}
}
argumentIdSet
.
forEach
(
argumentId
=>
{
const
argument
=
this
.
frame
.
arguments
.
find
(
arg
=>
argumentId
.
endsWith
(
arg
.
argument_id
));
...
...
@@ -78,20 +69,22 @@ export default {
}
return
styles
;
},
getPositionPhrases
(
schema
,
position
)
{
getAlternation
(
schema
,
alternation
)
{
const
r
=
this
.
alternations
[
this
.
frame
.
id
][
schema
.
id
][
alternation
];
return
r
;
},
getPositionPhrases
(
curr_alternations
,
index
,
curr_phrase_id
)
{
const
phrases
=
[];
if
(
this
.
alternations
)
{
const
curr_alternations
=
this
.
alternations
[
this
.
frame
.
id
][
schema
.
id
];
for
(
let
i
in
curr_alternations
)
{
const
alternation
=
curr_alternations
[
i
]
for
(
let
arg_id
in
alternation
)
{
const
phrase_id
s
=
alternation
[
arg_id
];
phrase_ids
.
forEach
(
phrase_id
=>
{
if
(
phrase_id
.
startsWith
(
position
.
id
))
{
phrases
.
push
(
this
.
realisation_phrases
[
arg_id
][
i
][
phrase_id
]
);
const
phrase_id
=
alternation
[
arg_id
];
if
(
phrase_id
.
startsWith
(
curr_
phrase_id
))
{
const
phrase
=
this
.
realisation_phrases
[
i
][
index
][
phrase_id
];
phrases
.
push
(
phrase
);
}
});
}
}
}
...
...
@@ -151,19 +144,24 @@ export default {
</tr>
<template
v-for=
"(alternation, index) in this.alternations[this.frame.id][schema.id]"
>
<tr
class=
"realisation-description"
>
<td
class=
"px-1 py-2"
:colspan=
"getSchemataPositionCnt(schema)"
v-html=
"getRealisationDescriptions(schema)"
></td>
<td
class=
"px-1 py-2"
:colspan=
"getSchemataPositionCnt(schema)"
v-html=
"getRealisationDescriptions(schema, index)"
></td>
</tr>
<tr
class=
"phrase-types alt-0"
>
<th
scope=
"row"
class=
"py-0 px-1 text-secondary"
>
Typy fraz
</th>
<td
v-for=
"position in schema.positions"
class=
"px-0 py-0 border-top border-left border-secondary"
>
<div
v-for=
"phrase in position.phrases"
class=
"phrase px-1 py-2"
:class=
"getPhraseCss(schema, position)"
>
<template
v-for=
"phrase in position.phrases"
>
<div
class=
"phrase px-1 py-2"
:class=
"getPhraseCss(position, alternation)"
>
<info-tooltip
:text=
"phrase.desc"
:visibleText=
"phrase.str"
/>
</div>
<div
v-for=
"phrase in getPositionPhrases(schema, position)"
class=
"realisation-phrase px-1 py-2"
><i>
{{
phrase
}}
</i></div>
<div
v-for=
"phrase in getPositionPhrases(alternation, index, phrase.id)"
class=
"realisation-phrase px-1 py-2"
><i>
{{
phrase
}}
</i></div>
</
template
>
</td>
</tr>
</template>
</tbody>
</table>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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