Skip to content

Commit 986419d

Browse files
committed
Change the handling of CSQ and CNCS
The structure can stay the same if we use different relations
1 parent 672689e commit 986419d

File tree

2 files changed

+3
-42
lines changed

2 files changed

+3
-42
lines changed

lib/Treex/Block/T2U/AdjustStructure.pm

+1-40
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ sub process_unode($self, $unode, $) {
3131
my $tnode = $unode->get_tnode;
3232
$self->translate_compl($unode, $tnode)
3333
if 'COMPL' eq $tnode->functor;
34-
$self->subordinate2coord($unode, $tnode)
35-
if $tnode->functor =~ /^(?:CONTRD|CNCS)$/;
3634
$self->adjust_coap($unode, $tnode) if 'coap' eq $tnode->nodetype;
3735
$self->remove_double_edge($unode, $1, $tnode)
3836
if $unode->functor =~ /^(.+)-of$/;
@@ -91,36 +89,6 @@ sub translate_compl($self, $unode, $tnode) {
9189
}
9290
}
9391

94-
sub subordinate2coord($self, $unode, $tnode) {
95-
if ($tnode->is_member) {
96-
$tnode = $tnode->_get_transitive_coap_root;
97-
($unode) = $tnode->get_referencing_nodes('t.rf');
98-
if (! $unode) {
99-
log_warn($tnode->{id} . ' has no unode for subordinate2coord');
100-
return
101-
}
102-
log_info('Skipping 2nd run'), return
103-
if $self->_coord_members_already_sub2coorded->{ $unode->id }++;
104-
}
105-
106-
my $t_parent = $tnode->get_parent;
107-
my ($u_parent) = $t_parent->get_referencing_nodes('t.rf');
108-
my $operator = $u_parent->parent->create_child;
109-
$operator->set_concept($unode->functor);
110-
$operator->set_functor($u_parent->functor);
111-
$u_parent->set_functor('ARG1');
112-
$unode->set_functor('ARG2');
113-
$u_parent->set_parent($operator);
114-
$unode->set_parent($operator);
115-
116-
my @auxc = grep 'AuxC' eq $_->afun,
117-
$unode->get_alignment;
118-
$unode->_remove_from_node_list('alignment.rf', @auxc);
119-
$operator->_add_to_node_list('alignment.rf', @auxc);
120-
121-
return
122-
}
123-
12492
sub negate_sibling($self, $unode, $tnode) {
12593
my $tparent = $tnode->parent;
12694
my @tsiblings
@@ -174,7 +142,7 @@ sub adjust_coap($self, $unode, $tnode) {
174142
my $ch = $_;
175143
! grep $ch == $_, @t_members
176144
} grep ! $_->is_member
177-
&& $_->functor !~ /^(?:C(?:M|ONTRD|NCS)|INTF)$/
145+
&& $_->functor !~ /^(?:CM|INTF)$/
178146
&& ! ('RHEM' eq $_->functor && $_->t_lemma =~ /^$negation$/),
179147
$tnode->children;
180148
my @u_members = grep 'ref' ne ($_->nodetype // ""),
@@ -250,13 +218,6 @@ tree.
250218
Translates the complement COMPL into a C<manner> or C<mod> based on the sempos
251219
of the parent. The second dependency is translated into a C<mod_of> arrow.
252220
253-
=item subordinate2coord
254-
255-
C<CONTRD> and C<CNCS> are treated as subordinate on t-layer, but they are
256-
translated as C<but-1> in UMR which is coordinate. The structure must be
257-
therefore changed: a new node is created to represent the coordination and
258-
both the C<CONTRD/CNCS> and its parent are rehung to it.
259-
260221
=item adjust_coap
261222
262223
Common dependents in a coordination are rehung to the first coordination

lib/Treex/Block/T2U/BuildUtree.pm

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ sub translate_val_frame
123123
##### CAUSAL ###########################
124124
'AIM' => 'purpose',
125125
'CAUS' => 'cause',
126-
'CNCS' => 'but-91', # sub->coord!
126+
'CNCS' => 'concession',
127127
'COND' => 'condition',
128128
'INTT' => 'purpose',
129129
##### MANNER ###########################
@@ -161,7 +161,7 @@ sub translate_val_frame
161161
'CONFR' => 'contrast-91', # event
162162
'CONJ' => 'and',
163163
'CONTRA' => 'contra-entity', # NOT in UMR
164-
'CSQ' => 'have-result-91',
164+
'CSQ' => 'consecutive',
165165
'DISJ' => 'or', # exclusive-disjunctive
166166
'GRAD' => 'gradation',
167167
'REAS' => 'have-cause-91', # event

0 commit comments

Comments
 (0)