| 1 | package Treex::Core::Phrase::Coordination; | ||||||||||||||||||||||||||||
| 2 | 2 | $Treex::Core::Phrase::Coordination::VERSION = '2.20151210'; | |||||||||||||||||||||||||||
| 3 | 2 | ▶ | use utf8; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 2 | ▶ | use namespace::autoclean; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 2 | ▶ | use Moose; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 2 | ▶ | use Treex::Core::Log; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 2 | extends 'Treex::Core::Phrase::BaseNTerm'; | |||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | has '_conjuncts_ref' => | ||||||||||||||||||||||||||||
| 14 | ( | ||||||||||||||||||||||||||||
| 15 | is => 'ro', | ||||||||||||||||||||||||||||
| 16 | isa => 'ArrayRef[Treex::Core::Phrase]', | ||||||||||||||||||||||||||||
| 17 | 0 | ▶ | default => sub { [] }, | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 18 | 2 | documentation => 'The public should not access directly the array reference. '. | |||||||||||||||||||||||||||
| 19 | 'They may use the public method conjuncts() to get the list.' | ||||||||||||||||||||||||||||
| 20 | ); | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | has '_coordinators_ref' => | ||||||||||||||||||||||||||||
| 23 | ( | ||||||||||||||||||||||||||||
| 24 | is => 'ro', | ||||||||||||||||||||||||||||
| 25 | isa => 'ArrayRef[Treex::Core::Phrase]', | ||||||||||||||||||||||||||||
| 26 | 0 | ▶ | default => sub { [] }, | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 27 | 2 | documentation => 'Coordinating conjunctions and similarly working words but not punctuation. '. | |||||||||||||||||||||||||||
| 28 | 'The public should not access directly the array reference. '. | ||||||||||||||||||||||||||||
| 29 | 'They may use the public method coordinators() to get the list.' | ||||||||||||||||||||||||||||
| 30 | ); | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | has '_punctuation_ref' => | ||||||||||||||||||||||||||||
| 33 | ( | ||||||||||||||||||||||||||||
| 34 | is => 'ro', | ||||||||||||||||||||||||||||
| 35 | isa => 'ArrayRef[Treex::Core::Phrase]', | ||||||||||||||||||||||||||||
| 36 | 0 | ▶ | default => sub { [] }, | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 37 | 2 | documentation => 'Punctuation between conjuncts. '. | |||||||||||||||||||||||||||
| 38 | 'The public should not access directly the array reference. '. | ||||||||||||||||||||||||||||
| 39 | 'They may use the public method punctuation() to get the list.' | ||||||||||||||||||||||||||||
| 40 | ); | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 2 | has 'head_rule' => | |||||||||||||||||||||||||||
| 43 | ( | ||||||||||||||||||||||||||||
| 44 | is => 'rw', | ||||||||||||||||||||||||||||
| 45 | isa => 'Str', | ||||||||||||||||||||||||||||
| 46 | required => 1, | ||||||||||||||||||||||||||||
| 47 | default => 'first_conjunct', | ||||||||||||||||||||||||||||
| 48 | documentation => | ||||||||||||||||||||||||||||
| 49 | 'first_conjunct ..... first conjunct is the head (there is always at least one conjunct); '. | ||||||||||||||||||||||||||||
| 50 | 'last_coordinator ... last coordinating conjunction, if any, is the head; '. | ||||||||||||||||||||||||||||
| 51 | ' last punctuation is head in asyndetic coordination; '. | ||||||||||||||||||||||||||||
| 52 | ' if there are neither conjunctions nor punctuation, the first conjunct is the head.' | ||||||||||||||||||||||||||||
| 53 | ); | ||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 58 | # This block will be called before object construction. It will modify and | ||||||||||||||||||||||||||||
| 59 | # complete attribute list if needed. Then it will pass all the attributes to | ||||||||||||||||||||||||||||
| 60 | # the constructor. | ||||||||||||||||||||||||||||
| 61 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 62 | around BUILDARGS => sub | ||||||||||||||||||||||||||||
| 63 | { | ||||||||||||||||||||||||||||
| 64 | 0 | ▶ | my $orig = shift; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=7 SCAR=40.3
| |||||||||||||||||||||||||||||
| 65 | 0 | my $class = shift; | |||||||||||||||||||||||||||
| 66 | # Call the default BUILDARGS in Moose::Object. It will take care of distinguishing between a hash reference and a plain hash. | ||||||||||||||||||||||||||||
| 67 | 0 | my $attr = $class->$orig(@_); | |||||||||||||||||||||||||||
| 68 | 0 | ▶ | if(defined($attr->{conjuncts}) && ref($attr->{conjuncts}) eq 'ARRAY') | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $attr->{"conjuncts"} and ref $attr->{"conjuncts"} eq "ARRAY"
MC/DC0%0/2
defined $attr->{"conjuncts"} and ref $attr->{"conjuncts"} eq "ARRAY"
defined $attr->{"conjuncts"}
ref $attr->{"conjuncts"} eq "ARRAY"
Truth table0%0/3
A and B
A= defined $attr->{"conjuncts"}B= ref $attr->{"conjuncts"} eq "ARRAY"
| |||||||||||||||||||||||||||||
| 69 | { | ||||||||||||||||||||||||||||
| 70 | 0 | $attr->{_conjuncts_ref} = $attr->{conjuncts}; | |||||||||||||||||||||||||||
| 71 | } | ||||||||||||||||||||||||||||
| 72 | 0 | ▶ | if(defined($attr->{coordinators}) && ref($attr->{coordinators}) eq 'ARRAY') | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $attr->{"coordinators"} and ref $attr->{"coordinators"} eq "ARRAY"
MC/DC0%0/2
defined $attr->{"coordinators"} and ref $attr->{"coordinators"} eq "ARRAY"
defined $attr->{"coordinators"}
ref $attr->{"coordinators"} eq "ARRAY"
Truth table0%0/3
A and B
A= defined $attr->{"coordinators"}B= ref $attr->{"coordinators"} eq "ARRAY"
| |||||||||||||||||||||||||||||
| 73 | { | ||||||||||||||||||||||||||||
| 74 | 0 | $attr->{_coordinators_ref} = $attr->{coordinators}; | |||||||||||||||||||||||||||
| 75 | } | ||||||||||||||||||||||||||||
| 76 | 0 | ▶ | if(defined($attr->{punctuation}) && ref($attr->{punctuation}) eq 'ARRAY') | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $attr->{"punctuation"} and ref $attr->{"punctuation"} eq "ARRAY"
MC/DC0%0/2
defined $attr->{"punctuation"} and ref $attr->{"punctuation"} eq "ARRAY"
defined $attr->{"punctuation"}
ref $attr->{"punctuation"} eq "ARRAY"
Truth table0%0/3
A and B
A= defined $attr->{"punctuation"}B= ref $attr->{"punctuation"} eq "ARRAY"
| |||||||||||||||||||||||||||||
| 77 | { | ||||||||||||||||||||||||||||
| 78 | 0 | $attr->{_punctuation_ref} = $attr->{punctuation}; | |||||||||||||||||||||||||||
| 79 | } | ||||||||||||||||||||||||||||
| 80 | 0 | return $attr; | |||||||||||||||||||||||||||
| 81 | 2 | }; | |||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||
| 84 | |||||||||||||||||||||||||||||
| 85 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 86 | # After the object is constructed, this block makes sure that the core children | ||||||||||||||||||||||||||||
| 87 | # refer back to it as their parent. Also, at least one conjunct is required and | ||||||||||||||||||||||||||||
| 88 | # making the conjuncts parametr required is not enough to enforce that. | ||||||||||||||||||||||||||||
| 89 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 90 | sub BUILD | ||||||||||||||||||||||||||||
| 91 | { | ||||||||||||||||||||||||||||
| 92 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
BUILD: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 93 | # Check that there is at least one conjunct. | ||||||||||||||||||||||||||||
| 94 | 0 | ▶ | if(scalar($self->conjuncts())==0) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 95 | { | ||||||||||||||||||||||||||||
| 96 | 0 | log_fatal("There must be at least one conjunct"); | |||||||||||||||||||||||||||
| 97 | } | ||||||||||||||||||||||||||||
| 98 | # Make sure that all core children refer to me as their parent. | ||||||||||||||||||||||||||||
| 99 | 0 | my @children = $self->core_children(); | |||||||||||||||||||||||||||
| 100 | 0 | foreach my $child (@children) | |||||||||||||||||||||||||||
| 101 | { | ||||||||||||||||||||||||||||
| 102 | 0 | ▶ | if(defined($child->parent())) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 103 | { | ||||||||||||||||||||||||||||
| 104 | 0 | log_fatal("The core child already has another parent"); | |||||||||||||||||||||||||||
| 105 | } | ||||||||||||||||||||||||||||
| 106 | 0 | $child->_set_parent($self); | |||||||||||||||||||||||||||
| 107 | } | ||||||||||||||||||||||||||||
| 108 | } | ||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||
| 112 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 113 | # Returns the list of conjuncts in the coordination. The only difference from | ||||||||||||||||||||||||||||
| 114 | # the getter _conjuncts_ref() is that the getter returns a reference to the | ||||||||||||||||||||||||||||
| 115 | # array of conjuncts, while this method returns a list of conjuncts, hence it | ||||||||||||||||||||||||||||
| 116 | # is more similar to the other methods that return lists of children. | ||||||||||||||||||||||||||||
| 117 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 118 | sub conjuncts | ||||||||||||||||||||||||||||
| 119 | { | ||||||||||||||||||||||||||||
| 120 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
conjuncts: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 121 | 0 | ▶ | log_fatal('Dead') if($self->dead()); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 122 | 0 | my @conjuncts = @{$self->_conjuncts_ref()}; | |||||||||||||||||||||||||||
| 123 | 0 | ▶ | return $self->_order_required(@_) ? $self->order_phrases(@conjuncts) : @conjuncts; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 124 | } | ||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||
| 126 | |||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||
| 128 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 129 | # Returns the list of coordinators. The only difference from the getter | ||||||||||||||||||||||||||||
| 130 | # _coordinators_ref() is that the getter returns a reference to the array of | ||||||||||||||||||||||||||||
| 131 | # coordinators, while this method returns a list, hence it is more similar to | ||||||||||||||||||||||||||||
| 132 | # the other methods that return lists of children. | ||||||||||||||||||||||||||||
| 133 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 134 | sub coordinators | ||||||||||||||||||||||||||||
| 135 | { | ||||||||||||||||||||||||||||
| 136 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
coordinators: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 137 | 0 | ▶ | log_fatal('Dead') if($self->dead()); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 138 | 0 | my @coordinators = @{$self->_coordinators_ref()}; | |||||||||||||||||||||||||||
| 139 | 0 | ▶ | return $self->_order_required(@_) ? $self->order_phrases(@coordinators) : @coordinators; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 140 | } | ||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||
| 144 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 145 | # Returns the list of punctuation symbols between conjuncts. The only | ||||||||||||||||||||||||||||
| 146 | # difference from the getter _punctuation_ref() is that the getter returns a | ||||||||||||||||||||||||||||
| 147 | # reference to the array, while this method returns a list, hence it is more | ||||||||||||||||||||||||||||
| 148 | # similar to the other methods that return lists of children. | ||||||||||||||||||||||||||||
| 149 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 150 | sub punctuation | ||||||||||||||||||||||||||||
| 151 | { | ||||||||||||||||||||||||||||
| 152 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
punctuation: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 153 | 0 | ▶ | log_fatal('Dead') if($self->dead()); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 154 | 0 | my @punctuation = @{$self->_punctuation_ref()}; | |||||||||||||||||||||||||||
| 155 | 0 | ▶ | return $self->_order_required(@_) ? $self->order_phrases(@punctuation) : @punctuation; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 156 | } | ||||||||||||||||||||||||||||
| 157 | |||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||
| 159 | |||||||||||||||||||||||||||||
| 160 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 161 | # Returns the head child of the phrase. Depending on the current preference, | ||||||||||||||||||||||||||||
| 162 | # it is either the preposition or its argument. | ||||||||||||||||||||||||||||
| 163 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 164 | sub head | ||||||||||||||||||||||||||||
| 165 | { | ||||||||||||||||||||||||||||
| 166 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
head: not called CC=6 SCAR=37.4
Pod
documented
| |||||||||||||||||||||||||||||
| 167 | 0 | ▶ | log_fatal('Dead') if($self->dead()); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 168 | 0 | my $rule = $self->head_rule(); | |||||||||||||||||||||||||||
| 169 | 0 | ▶ | if($rule eq 'first_conjunct') | ||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 170 | { | ||||||||||||||||||||||||||||
| 171 | # There is always at least one conjunct. | ||||||||||||||||||||||||||||
| 172 | 0 | return ($self->conjuncts())[0]; | |||||||||||||||||||||||||||
| 173 | } | ||||||||||||||||||||||||||||
| 174 | elsif($rule eq 'last_coordinator') | ||||||||||||||||||||||||||||
| 175 | { | ||||||||||||||||||||||||||||
| 176 | # It is not guaranteed that there are coordinators or punctuation. | ||||||||||||||||||||||||||||
| 177 | 0 | my @coordinators = $self->coordinators('ordered' => 1); | |||||||||||||||||||||||||||
| 178 | 0 | ▶ | if(scalar(@coordinators) > 0) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 179 | { | ||||||||||||||||||||||||||||
| 180 | 0 | return $coordinators[-1]; | |||||||||||||||||||||||||||
| 181 | } | ||||||||||||||||||||||||||||
| 182 | # No coordinators found. What about punctuation? | ||||||||||||||||||||||||||||
| 183 | 0 | my @punctuation = $self->punctuation('ordered' => 1); | |||||||||||||||||||||||||||
| 184 | 0 | ▶ | if(scalar(@punctuation) > 0) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 185 | { | ||||||||||||||||||||||||||||
| 186 | 0 | return $punctuation[-1]; | |||||||||||||||||||||||||||
| 187 | } | ||||||||||||||||||||||||||||
| 188 | # No delimiters found. We have to pick a conjunct, whether we like it or not. | ||||||||||||||||||||||||||||
| 189 | 0 | return ($self->conjuncts())[0]; | |||||||||||||||||||||||||||
| 190 | } | ||||||||||||||||||||||||||||
| 191 | else | ||||||||||||||||||||||||||||
| 192 | { | ||||||||||||||||||||||||||||
| 193 | 0 | log_fatal("Unknown head rule '$rule'"); | |||||||||||||||||||||||||||
| 194 | } | ||||||||||||||||||||||||||||
| 195 | } | ||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||
| 199 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 200 | # Returns the list of non-head children of the phrase, i.e. the dependents plus | ||||||||||||||||||||||||||||
| 201 | # all core children except the one that currently serves as the head. | ||||||||||||||||||||||||||||
| 202 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 203 | sub nonhead_children | ||||||||||||||||||||||||||||
| 204 | { | ||||||||||||||||||||||||||||
| 205 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
nonhead_children: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 206 | 0 | ▶ | log_fatal('Dead') if($self->dead()); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 207 | 0 | my $head = $self->head(); | |||||||||||||||||||||||||||
| 208 | 0 | my @children = grep {$_ != $head} ($self->children()); | |||||||||||||||||||||||||||
| 209 | 0 | ▶ | return $self->_order_required(@_) ? $self->order_phrases(@children) : @children; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 210 | } | ||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||
| 212 | |||||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||
| 214 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 215 | # Returns the list of the children of the phrase that are not dependents, i.e. | ||||||||||||||||||||||||||||
| 216 | # all conjuncts, coordinators and punctuation. | ||||||||||||||||||||||||||||
| 217 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 218 | sub core_children | ||||||||||||||||||||||||||||
| 219 | { | ||||||||||||||||||||||||||||
| 220 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
core_children: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 221 | 0 | ▶ | log_fatal('Dead') if($self->dead()); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 222 | 0 | my @children = ($self->conjuncts(), $self->coordinators(), $self->punctuation()); | |||||||||||||||||||||||||||
| 223 | 0 | ▶ | return $self->_order_required(@_) ? $self->order_phrases(@children) : @children; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 224 | } | ||||||||||||||||||||||||||||
| 225 | |||||||||||||||||||||||||||||
| 226 | |||||||||||||||||||||||||||||
| 227 | |||||||||||||||||||||||||||||
| 228 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 229 | # Replaces one of the core children (conjunct, coordinator or punctuation) by | ||||||||||||||||||||||||||||
| 230 | # another phrase. This is used when we want to transform the child to a | ||||||||||||||||||||||||||||
| 231 | # different class of phrase. The replacement must not have a parent yet. | ||||||||||||||||||||||||||||
| 232 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 233 | sub replace_core_child | ||||||||||||||||||||||||||||
| 234 | { | ||||||||||||||||||||||||||||
| 235 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
replace_core_child: not called CC=8 SCAR=42.8
Pod
documented
| |||||||||||||||||||||||||||||
| 236 | 0 | my $old_child = shift; # Treex::Core::Phrase | |||||||||||||||||||||||||||
| 237 | 0 | my $new_child = shift; # Treex::Core::Phrase | |||||||||||||||||||||||||||
| 238 | 0 | ▶ | log_fatal('Dead') if($self->dead()); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 239 | 0 | $self->_check_old_new_child($old_child, $new_child); | |||||||||||||||||||||||||||
| 240 | 0 | $old_child->_set_parent(undef); | |||||||||||||||||||||||||||
| 241 | 0 | $new_child->_set_parent($self); | |||||||||||||||||||||||||||
| 242 | # Find out what type of core child this is (in which array we have it). | ||||||||||||||||||||||||||||
| 243 | 0 | my $ar = $self->_conjuncts_ref(); | |||||||||||||||||||||||||||
| 244 | 0 | my $imax = $#{$ar}; | |||||||||||||||||||||||||||
| 245 | 0 | ▶ | for(my $i = 0; $i <= $imax; $i++) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 246 | { | ||||||||||||||||||||||||||||
| 247 | 0 | ▶ | if($ar->[$i] == $old_child) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 248 | { | ||||||||||||||||||||||||||||
| 249 | 0 | splice(@{$ar}, $i, 1, $new_child); | |||||||||||||||||||||||||||
| 250 | 0 | return; | |||||||||||||||||||||||||||
| 251 | } | ||||||||||||||||||||||||||||
| 252 | } | ||||||||||||||||||||||||||||
| 253 | # Not found among conjuncts. Try coordinators. | ||||||||||||||||||||||||||||
| 254 | 0 | $ar = $self->_coordinators_ref(); | |||||||||||||||||||||||||||
| 255 | 0 | $imax = $#{$ar}; | |||||||||||||||||||||||||||
| 256 | 0 | ▶ | for(my $i = 0; $i <= $imax; $i++) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 257 | { | ||||||||||||||||||||||||||||
| 258 | 0 | ▶ | if($ar->[$i] == $old_child) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 259 | { | ||||||||||||||||||||||||||||
| 260 | 0 | splice(@{$ar}, $i, 1, $new_child); | |||||||||||||||||||||||||||
| 261 | 0 | return; | |||||||||||||||||||||||||||
| 262 | } | ||||||||||||||||||||||||||||
| 263 | } | ||||||||||||||||||||||||||||
| 264 | # Not found among coordinators. Try punctuation. | ||||||||||||||||||||||||||||
| 265 | 0 | $ar = $self->_punctuation_ref(); | |||||||||||||||||||||||||||
| 266 | 0 | $imax = $#{$ar}; | |||||||||||||||||||||||||||
| 267 | 0 | ▶ | for(my $i = 0; $i <= $imax; $i++) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 268 | { | ||||||||||||||||||||||||||||
| 269 | 0 | ▶ | if($ar->[$i] == $old_child) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 270 | { | ||||||||||||||||||||||||||||
| 271 | 0 | splice(@{$ar}, $i, 1, $new_child); | |||||||||||||||||||||||||||
| 272 | 0 | return; | |||||||||||||||||||||||||||
| 273 | } | ||||||||||||||||||||||||||||
| 274 | } | ||||||||||||||||||||||||||||
| 275 | # We should not ever get here. | ||||||||||||||||||||||||||||
| 276 | 0 | log_fatal("The child to be replaced is not in my core"); | |||||||||||||||||||||||||||
| 277 | } | ||||||||||||||||||||||||||||
| 278 | |||||||||||||||||||||||||||||
| 279 | |||||||||||||||||||||||||||||
| 280 | |||||||||||||||||||||||||||||
| 281 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 282 | # Projects dependencies between the head and the dependents back to the | ||||||||||||||||||||||||||||
| 283 | # underlying dependency structure. | ||||||||||||||||||||||||||||
| 284 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 285 | sub project_dependencies | ||||||||||||||||||||||||||||
| 286 | { | ||||||||||||||||||||||||||||
| 287 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
project_dependencies: not called CC=9 SCAR=45.0
Pod
documented
| |||||||||||||||||||||||||||||
| 288 | 0 | ▶ | log_fatal('Dead') if($self->dead()); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 289 | # Recursion first, we work bottom-up. | ||||||||||||||||||||||||||||
| 290 | 0 | my @children = $self->children(); | |||||||||||||||||||||||||||
| 291 | 0 | foreach my $child (@children) | |||||||||||||||||||||||||||
| 292 | { | ||||||||||||||||||||||||||||
| 293 | 0 | $child->project_dependencies(); | |||||||||||||||||||||||||||
| 294 | } | ||||||||||||||||||||||||||||
| 295 | 0 | my $head_node = $self->node(); | |||||||||||||||||||||||||||
| 296 | # We also have to change selected deprels. It depends on the current head rule. | ||||||||||||||||||||||||||||
| 297 | 0 | ▶ | if($self->head_rule() eq 'first_conjunct') | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 298 | { | ||||||||||||||||||||||||||||
| 299 | # If the first conjunct has a deprel other than 'dep', and another conjunct has 'dep', | ||||||||||||||||||||||||||||
| 300 | # then the other conjunct is an orphan caused by ellipsis. We currently keep the 'dep' | ||||||||||||||||||||||||||||
| 301 | # relation for orphans and do not label them 'conj'. | ||||||||||||||||||||||||||||
| 302 | ###!!! This is specific to the conversion from the Prague style to Universal Dependencies. | ||||||||||||||||||||||||||||
| 303 | ###!!! It should be solved elsewhere. Even orphans are not the main business of coordinations. | ||||||||||||||||||||||||||||
| 304 | 0 | my $dep_means_orphan = $self->deprel() ne 'dep'; | |||||||||||||||||||||||||||
| 305 | 0 | my @conjuncts = $self->conjuncts('ordered' => 1); | |||||||||||||||||||||||||||
| 306 | 0 | shift(@conjuncts); | |||||||||||||||||||||||||||
| 307 | 0 | foreach my $c (@conjuncts) | |||||||||||||||||||||||||||
| 308 | { | ||||||||||||||||||||||||||||
| 309 | 0 | my $conj_node = $c->node(); | |||||||||||||||||||||||||||
| 310 | 0 | $conj_node->set_parent($head_node); | |||||||||||||||||||||||||||
| 311 | ###!!! The old implementation of Udep did not care about the ExD orphans. | ||||||||||||||||||||||||||||
| 312 | ###!!! Thus we will turn this off at least until we successfully pass regression tests | ||||||||||||||||||||||||||||
| 313 | ###!!! and fully deploy the new implementation. | ||||||||||||||||||||||||||||
| 314 | 0 | if(0 && ###!!! | |||||||||||||||||||||||||||
| 315 | $dep_means_orphan && $c->deprel() eq 'dep') | ||||||||||||||||||||||||||||
| 316 | { | ||||||||||||||||||||||||||||
| 317 | $conj_node->set_deprel('dep'); | ||||||||||||||||||||||||||||
| 318 | } | ||||||||||||||||||||||||||||
| 319 | else | ||||||||||||||||||||||||||||
| 320 | { | ||||||||||||||||||||||||||||
| 321 | 0 | $conj_node->set_deprel('conj'); | |||||||||||||||||||||||||||
| 322 | } | ||||||||||||||||||||||||||||
| 323 | } | ||||||||||||||||||||||||||||
| 324 | 0 | my @coordinators = $self->coordinators(); | |||||||||||||||||||||||||||
| 325 | 0 | foreach my $c (@coordinators) | |||||||||||||||||||||||||||
| 326 | { | ||||||||||||||||||||||||||||
| 327 | 0 | my $coor_node = $c->node(); | |||||||||||||||||||||||||||
| 328 | 0 | $coor_node->set_parent($head_node); | |||||||||||||||||||||||||||
| 329 | 0 | $coor_node->set_deprel('cc'); | |||||||||||||||||||||||||||
| 330 | } | ||||||||||||||||||||||||||||
| 331 | 0 | my @punctuation = $self->punctuation(); | |||||||||||||||||||||||||||
| 332 | 0 | foreach my $p (@punctuation) | |||||||||||||||||||||||||||
| 333 | { | ||||||||||||||||||||||||||||
| 334 | 0 | my $punct_node = $p->node(); | |||||||||||||||||||||||||||
| 335 | 0 | $punct_node->set_parent($head_node); | |||||||||||||||||||||||||||
| 336 | 0 | $punct_node->set_deprel('punct'); | |||||||||||||||||||||||||||
| 337 | } | ||||||||||||||||||||||||||||
| 338 | 0 | my @dependents = $self->dependents(); | |||||||||||||||||||||||||||
| 339 | 0 | foreach my $d (@dependents) | |||||||||||||||||||||||||||
| 340 | { | ||||||||||||||||||||||||||||
| 341 | 0 | my $dep_node = $d->node(); | |||||||||||||||||||||||||||
| 342 | 0 | $dep_node->set_parent($head_node); | |||||||||||||||||||||||||||
| 343 | 0 | $dep_node->set_deprel($d->deprel()); | |||||||||||||||||||||||||||
| 344 | } | ||||||||||||||||||||||||||||
| 345 | } | ||||||||||||||||||||||||||||
| 346 | else ###!!! This is probably not correct, as it does not assume any particular coordination style. | ||||||||||||||||||||||||||||
| 347 | { | ||||||||||||||||||||||||||||
| 348 | 0 | my @dependents = $self->nonhead_children(); | |||||||||||||||||||||||||||
| 349 | 0 | foreach my $dependent (@dependents) | |||||||||||||||||||||||||||
| 350 | { | ||||||||||||||||||||||||||||
| 351 | 0 | my $dep_node = $dependent->node(); | |||||||||||||||||||||||||||
| 352 | 0 | $dep_node->set_parent($head_node); | |||||||||||||||||||||||||||
| 353 | 0 | $dep_node->set_deprel($dependent->deprel()); | |||||||||||||||||||||||||||
| 354 | } | ||||||||||||||||||||||||||||
| 355 | } | ||||||||||||||||||||||||||||
| 356 | } | ||||||||||||||||||||||||||||
| 357 | |||||||||||||||||||||||||||||
| 358 | |||||||||||||||||||||||||||||
| 359 | |||||||||||||||||||||||||||||
| 360 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 361 | # Returns a textual representation of the phrase and all subphrases. Useful for | ||||||||||||||||||||||||||||
| 362 | # debugging. | ||||||||||||||||||||||||||||
| 363 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 364 | sub as_string | ||||||||||||||||||||||||||||
| 365 | { | ||||||||||||||||||||||||||||
| 366 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
as_string: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||
| 367 | 0 | my @conjuncts = $self->conjuncts('ordered' => 1); | |||||||||||||||||||||||||||
| 368 | 0 | my $conj = 'CONJ '.join(', ', map {$_->as_string()} (@conjuncts)); | |||||||||||||||||||||||||||
| 369 | 0 | my @coordinators = $self->coordinators('ordered' => 1); | |||||||||||||||||||||||||||
| 370 | 0 | my $coor = join(', ', map {$_->as_string()} (@coordinators)); | |||||||||||||||||||||||||||
| 371 | 0 | ▶ | $coor = 'COOR '.$coor if($coor); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 372 | 0 | my @punctuation = $self->punctuation('ordered' => 1); | |||||||||||||||||||||||||||
| 373 | 0 | my $punc = join(', ', map {$_->as_string()} (@punctuation)); | |||||||||||||||||||||||||||
| 374 | 0 | ▶ | $punc = 'PUNC '.$punc if($punc); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 375 | 0 | my @dependents = $self->dependents('ordered' => 1); | |||||||||||||||||||||||||||
| 376 | 0 | my $deps = join(', ', map {$_->as_string()} (@dependents)); | |||||||||||||||||||||||||||
| 377 | 0 | ▶ | $deps = 'DEPS '.$deps if($deps); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 378 | 0 | my $subtree = join(' ', ($conj, $coor, $punc, $deps)); | |||||||||||||||||||||||||||
| 379 | 0 | return "(CO $subtree)"; | |||||||||||||||||||||||||||
| 380 | } | ||||||||||||||||||||||||||||
| 381 | |||||||||||||||||||||||||||||
| 382 | |||||||||||||||||||||||||||||
| 383 | |||||||||||||||||||||||||||||
| 384 | 2 | __PACKAGE__->meta->make_immutable(); | |||||||||||||||||||||||||||
| 385 | |||||||||||||||||||||||||||||
| 386 | 2 | 1; | |||||||||||||||||||||||||||
| 387 | |||||||||||||||||||||||||||||
| 388 | |||||||||||||||||||||||||||||
| 389 | |||||||||||||||||||||||||||||
| 390 | =for Pod::Coverage BUILD | ||||||||||||||||||||||||||||
| 391 | |||||||||||||||||||||||||||||
| 392 | =encoding utf-8 | ||||||||||||||||||||||||||||
| 393 | |||||||||||||||||||||||||||||
| 394 | =head1 NAME | ||||||||||||||||||||||||||||
| 395 | |||||||||||||||||||||||||||||
| 396 | Treex::Core::Phrase::Coordination | ||||||||||||||||||||||||||||
| 397 | |||||||||||||||||||||||||||||
| 398 | =head1 VERSION | ||||||||||||||||||||||||||||
| 399 | |||||||||||||||||||||||||||||
| 400 | version 2.20151210 | ||||||||||||||||||||||||||||
| 401 | |||||||||||||||||||||||||||||
| 402 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||
| 403 | |||||||||||||||||||||||||||||
| 404 | use Treex::Core::Document; | ||||||||||||||||||||||||||||
| 405 | use Treex::Core::Phrase::Term; | ||||||||||||||||||||||||||||
| 406 | use Treex::Core::Phrase::Coordination; | ||||||||||||||||||||||||||||
| 407 | |||||||||||||||||||||||||||||
| 408 | my $document = new Treex::Core::Document; | ||||||||||||||||||||||||||||
| 409 | my $bundle = $document->create_bundle(); | ||||||||||||||||||||||||||||
| 410 | my $zone = $bundle->create_zone('en'); | ||||||||||||||||||||||||||||
| 411 | my $root = $zone->create_atree(); | ||||||||||||||||||||||||||||
| 412 | my $coord = $root->create_child(); | ||||||||||||||||||||||||||||
| 413 | my $conj1 = $coord->create_child(); | ||||||||||||||||||||||||||||
| 414 | my $conj2 = $coord->create_child(); | ||||||||||||||||||||||||||||
| 415 | $coord->set_deprel('Coord'); | ||||||||||||||||||||||||||||
| 416 | $conj1->set_deprel('Pred_M'); | ||||||||||||||||||||||||||||
| 417 | $conj2->set_deprel('Pred_M'); | ||||||||||||||||||||||||||||
| 418 | my $coordphr = new Treex::Core::Phrase::Term ('node' => $coord); | ||||||||||||||||||||||||||||
| 419 | my $conj1phr = new Treex::Core::Phrase::Term ('node' => $conj1); | ||||||||||||||||||||||||||||
| 420 | my $conj2phr = new Treex::Core::Phrase::Term ('node' => $conj2); | ||||||||||||||||||||||||||||
| 421 | my $cphrase = new Treex::Core::Phrase::Coordination ('conjuncts' => [$conj1phr, $conj2phr], 'coordinators' => [$coordphr], 'head_rule' => 'last_coordinator'); | ||||||||||||||||||||||||||||
| 422 | |||||||||||||||||||||||||||||
| 423 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 424 | |||||||||||||||||||||||||||||
| 425 | C<Treex::Core::Phrase::Coordination> is a special case of | ||||||||||||||||||||||||||||
| 426 | C<Treex::Core::Phrase::NTerm>. It does not have a fixed head but it has a head | ||||||||||||||||||||||||||||
| 427 | rule that specifies how the head child should be determined if needed. On the | ||||||||||||||||||||||||||||
| 428 | other hand, there are several sets of core children that are not ordinary | ||||||||||||||||||||||||||||
| 429 | dependents. They are conjuncts (i.e. the phrases that are coordinated), | ||||||||||||||||||||||||||||
| 430 | coordinators (coordinating conjunctions and similar words) and | ||||||||||||||||||||||||||||
| 431 | conjunct-delimiting punctuation. | ||||||||||||||||||||||||||||
| 432 | |||||||||||||||||||||||||||||
| 433 | =head1 ATTRIBUTES | ||||||||||||||||||||||||||||
| 434 | |||||||||||||||||||||||||||||
| 435 | =over | ||||||||||||||||||||||||||||
| 436 | |||||||||||||||||||||||||||||
| 437 | =item _conjuncts_ref | ||||||||||||||||||||||||||||
| 438 | |||||||||||||||||||||||||||||
| 439 | Reference to array of sub-C<Phrase>s (children) that are coordinated in this | ||||||||||||||||||||||||||||
| 440 | phrase. The conjuncts are counted among the I<core children> of C<Coordination>. | ||||||||||||||||||||||||||||
| 441 | Every C<Coordination> must always have at least one conjunct. | ||||||||||||||||||||||||||||
| 442 | |||||||||||||||||||||||||||||
| 443 | =item _coordinators_ref | ||||||||||||||||||||||||||||
| 444 | |||||||||||||||||||||||||||||
| 445 | Reference to array of sub-C<Phrase>s (children) that act as coordinating conjunctions | ||||||||||||||||||||||||||||
| 446 | and that are words, not punctuation. | ||||||||||||||||||||||||||||
| 447 | The coordinators are counted among the I<core children> of C<Coordination>. | ||||||||||||||||||||||||||||
| 448 | However, their presence is not required. | ||||||||||||||||||||||||||||
| 449 | |||||||||||||||||||||||||||||
| 450 | =item _punctuation_ref | ||||||||||||||||||||||||||||
| 451 | |||||||||||||||||||||||||||||
| 452 | Reference to array of sub-C<Phrase>s (children) that contain punctuation between | ||||||||||||||||||||||||||||
| 453 | conjuncts. | ||||||||||||||||||||||||||||
| 454 | The punctuation phrases are counted among the I<core children> of C<Coordination>. | ||||||||||||||||||||||||||||
| 455 | However, their presence is not required. | ||||||||||||||||||||||||||||
| 456 | |||||||||||||||||||||||||||||
| 457 | =item head_rule | ||||||||||||||||||||||||||||
| 458 | |||||||||||||||||||||||||||||
| 459 | A string that says how the head of the coordination should be selected. | ||||||||||||||||||||||||||||
| 460 | C<first_conjunct> means that the first conjunct is the head (there is always at | ||||||||||||||||||||||||||||
| 461 | least one conjunct). | ||||||||||||||||||||||||||||
| 462 | C<last_coordinator> means that the last coordinating conjunction, if any, is | ||||||||||||||||||||||||||||
| 463 | the head; in asyndetic coordination (no conjunctions) the last punctuation | ||||||||||||||||||||||||||||
| 464 | symbol is the head; if there are neither conjunctions nor punctuation, the | ||||||||||||||||||||||||||||
| 465 | first conjunct is the head. | ||||||||||||||||||||||||||||
| 466 | |||||||||||||||||||||||||||||
| 467 | =back | ||||||||||||||||||||||||||||
| 468 | |||||||||||||||||||||||||||||
| 469 | =head1 METHODS | ||||||||||||||||||||||||||||
| 470 | |||||||||||||||||||||||||||||
| 471 | =over | ||||||||||||||||||||||||||||
| 472 | |||||||||||||||||||||||||||||
| 473 | =item head | ||||||||||||||||||||||||||||
| 474 | |||||||||||||||||||||||||||||
| 475 | A sub-C<Phrase> of this phrase that is at the moment considered the head phrase | ||||||||||||||||||||||||||||
| 476 | (in the sense of dependency syntax). It depends on the current C<head_rule>. | ||||||||||||||||||||||||||||
| 477 | |||||||||||||||||||||||||||||
| 478 | =item conjuncts | ||||||||||||||||||||||||||||
| 479 | |||||||||||||||||||||||||||||
| 480 | Returns the list of conjuncts. The only difference from the | ||||||||||||||||||||||||||||
| 481 | getter C<_conjuncts_ref()> is that the getter returns a reference to the array | ||||||||||||||||||||||||||||
| 482 | of conjuncts, while this method returns a list of conjuncts. Hence this method is | ||||||||||||||||||||||||||||
| 483 | more similar to the other methods that return lists of children. | ||||||||||||||||||||||||||||
| 484 | |||||||||||||||||||||||||||||
| 485 | =item coordinators | ||||||||||||||||||||||||||||
| 486 | |||||||||||||||||||||||||||||
| 487 | Returns the list of coordinating conjunctions (but not punctuation). | ||||||||||||||||||||||||||||
| 488 | The only difference from the | ||||||||||||||||||||||||||||
| 489 | getter C<_coordinators_ref()> is that the getter returns a reference to array, | ||||||||||||||||||||||||||||
| 490 | while this method returns a list. Hence this method is | ||||||||||||||||||||||||||||
| 491 | more similar to the other methods that return lists of children. | ||||||||||||||||||||||||||||
| 492 | |||||||||||||||||||||||||||||
| 493 | =item punctuation | ||||||||||||||||||||||||||||
| 494 | |||||||||||||||||||||||||||||
| 495 | Returns the list of punctuation symbols between conjuncts. | ||||||||||||||||||||||||||||
| 496 | The only difference from the | ||||||||||||||||||||||||||||
| 497 | getter C<_punctuation_ref()> is that the getter returns a reference to array, | ||||||||||||||||||||||||||||
| 498 | while this method returns a list. Hence this method is | ||||||||||||||||||||||||||||
| 499 | more similar to the other methods that return lists of children. | ||||||||||||||||||||||||||||
| 500 | |||||||||||||||||||||||||||||
| 501 | =item nonhead_children | ||||||||||||||||||||||||||||
| 502 | |||||||||||||||||||||||||||||
| 503 | Returns the list of non-head children of the phrase, i.e. the dependents plus | ||||||||||||||||||||||||||||
| 504 | all core children except the one that currently serves as the head. | ||||||||||||||||||||||||||||
| 505 | |||||||||||||||||||||||||||||
| 506 | =item core_children | ||||||||||||||||||||||||||||
| 507 | |||||||||||||||||||||||||||||
| 508 | Returns the list of the children of the phrase that are not dependents, i.e. | ||||||||||||||||||||||||||||
| 509 | all conjuncts, coordinators and punctuation. | ||||||||||||||||||||||||||||
| 510 | |||||||||||||||||||||||||||||
| 511 | =item project_dependencies | ||||||||||||||||||||||||||||
| 512 | |||||||||||||||||||||||||||||
| 513 | Projects dependencies between the head and the dependents back to the | ||||||||||||||||||||||||||||
| 514 | underlying dependency structure. | ||||||||||||||||||||||||||||
| 515 | For coordinations the behavior depends on the currently selected head rule: | ||||||||||||||||||||||||||||
| 516 | certain deprels may have to be adjusted. | ||||||||||||||||||||||||||||
| 517 | |||||||||||||||||||||||||||||
| 518 | =item as_string | ||||||||||||||||||||||||||||
| 519 | |||||||||||||||||||||||||||||
| 520 | Returns a textual representation of the phrase and all subphrases. Useful for | ||||||||||||||||||||||||||||
| 521 | debugging. | ||||||||||||||||||||||||||||
| 522 | |||||||||||||||||||||||||||||
| 523 | =back | ||||||||||||||||||||||||||||
| 524 | |||||||||||||||||||||||||||||
| 525 | =head1 AUTHORS | ||||||||||||||||||||||||||||
| 526 | |||||||||||||||||||||||||||||
| 527 | Daniel Zeman <zeman@ufal.mff.cuni.cz> | ||||||||||||||||||||||||||||
| 528 | |||||||||||||||||||||||||||||
| 529 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||||||||||
| 530 | |||||||||||||||||||||||||||||
| 531 | Copyright © 2013, 2015 by Institute of Formal and Applied Linguistics, Charles University in Prague | ||||||||||||||||||||||||||||
| 532 | This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. | ||||||||||||||||||||||||||||