| 1 | package Treex::Block::W2A::EN::SetIsMemberFromDeprel; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 1 | $Treex::Block::W2A::EN::SetIsMemberFromDeprel::VERSION = '2.20151102'; | |||||||||||||||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | 1 | ▶ | use Moose; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use Treex::Core::Common; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | 1 | extends 'Treex::Core::Block'; | |||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||
| 9 | 0 | ▶ | sub process_anode { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
process_anode: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | 0 | my ( $self, $anode ) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||
| 12 | 0 | ▶ | if ($anode->is_member | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$anode->is_member or $anode->conll_deprel eq "COORD" and $anode->get_parent->tag =~ /^(CC|P)$/
$anode->conll_deprel eq "COORD" and $anode->get_parent->tag =~ /^(CC|P)$/
MC/DC0%0/3
$anode->is_member or $anode->conll_deprel eq "COORD" and $anode->get_parent->tag =~ /^(CC|P)$/
$anode->is_member
$anode->conll_deprel eq "COORD"
$anode->get_parent->tag =~ /^(CC|P)$/
Truth table0%0/4
A or B and C
A= $anode->is_memberB= $anode->conll_deprel eq "COORD"C= $anode->get_parent->tag =~ /^(CC|P)$/
| |||||||||||||||||||||||||||||||||||||||||||
| 13 | || ( $anode->conll_deprel eq 'COORD' && $anode->get_parent->tag =~ /^(CC|P)$/ ) | ||||||||||||||||||||||||||||||||||||||||||
| 14 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 15 | { | ||||||||||||||||||||||||||||||||||||||||||
| 16 | 0 | $anode->set_is_member(1); | |||||||||||||||||||||||||||||||||||||||||
| 17 | } | ||||||||||||||||||||||||||||||||||||||||||
| 18 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 19 | 0 | $anode->set_is_member(0); | |||||||||||||||||||||||||||||||||||||||||
| 20 | } | ||||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||
| 22 | 0 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||||||||||
| 25 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||||
| 27 | =over | ||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||
| 29 | =item Treex::Block::W2A::EN::SetIsMemberFromDeprel | ||||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||
| 31 | Nodes with C<conll_deprel> attribute C<COORD> | ||||||||||||||||||||||||||||||||||||||||||
| 32 | under coordinating conjunction (tag=C) or coordinating comma (tag=P) | ||||||||||||||||||||||||||||||||||||||||||
| 33 | are marked with the C<is_member> attribute (i.e. as conjuncts). | ||||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||
| 35 | CoNLL2007 English data marks several other constructions with COORD. | ||||||||||||||||||||||||||||||||||||||||||
| 36 | We don't consider these coordinations and therefore we don't mark these with C<is_member>. | ||||||||||||||||||||||||||||||||||||||||||
| 37 | For example: | ||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||
| 39 | =over | ||||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||
| 41 | =item A rather then B | ||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||
| 43 | =item A along with B | ||||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||||
| 45 | =item A instead of B | ||||||||||||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||||||||||||
| 47 | =item A as much as B | ||||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||||
| 49 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||||||||||
| 51 | If C<is_member> is set before, it is preserved. | ||||||||||||||||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||||||||||||||||
| 53 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||||
| 55 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||||||||||||||||
| 57 | # Copyright 2009-2012 Martin Popel | ||||||||||||||||||||||||||||||||||||||||||
| 58 | # This file is distributed under the GNU General Public License v2. See $TMT_ROOT/README. | ||||||||||||||||||||||||||||||||||||||||||