PML/Backend/CSTS/Fs2csts.pm

filter: Statementstmt 6.2% 17 / 271 Branchbran 0.0% 0 / 202 Conditioncond 0.0% 0 / 93 MC/DCmcdc 0.0% 0 / 51 Subroutinesub 36.3% 4 / 11 Podpod 0.0% 0 / 7 totaltotal 3.3% 21 / 635 CC 146 SCAR 97.2
CC
146
Cov
3%
write
18906.0
print_split_attr_with_num_attr
20.0
make_TRt
12.0
CRAP 16604.5
↑ Summary PML/Instance/Reader.pm »
1 package Treex::PML::Backend::CSTS::Fs2csts;
2  
3 2 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 $VERSION='2.29'; # version template
6 }
7  
8 2 ▶use Treex::PML;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶no warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 our $export_dependency=1;
12 2 our $compatibility_mode=0;
13 2 our $preserve_err1=0;
14  
15 2 our $gov = undef;
16  
17 2 our @extra_attributes=();
18  
19 2 our %TRt = (
20 gender_ANIM => 'M',
21 gender_INAN => 'I',
22 gender_FEM => 'F',
23 gender_NEUT => 'N',
24 gender_NA => '-',
25 number_SG => 'S',
26 number_PL => 'P',
27 number_NA => '-',
28 degcmp_POS => '1',
29 degcmp_COMP => '2',
30 degcmp_SUP => '3',
31 degcmp_NA => '-',
32 tense_SIM => 'S',
33 tense_POST => 'P',
34 tense_ANT => 'A',
35 tense_NA => '-',
36 aspect_PROC => 'P',
37 aspect_CPL => 'C',
38 aspect_RES => 'R',
39 aspect_NA => '-',
40 iterativeness_IT1 => '1',
41 iterativeness_IT0 => '0',
42 iterativeness_NA => '-',
43 verbmod_IND => 'I',
44 verbmod_IMP => 'M',
45 verbmod_CDN => 'C',
46 verbmod_NA => '-',
47 deontmod_DECL => 'D',
48 deontmod_DEB => 'B',
49 deontmod_HRT => 'H',
50 deontmod_VOL => 'V',
51 deontmod_POSS => 'S',
52 deontmod_PERM => 'P',
53 deontmod_FAC => 'F',
54 deontmod_NA => '-',
55 sentmod_ENUNC => '.',
56 sentmod_EXCL => '!',
57 sentmod_DESID => 'D',
58 sentmod_IMPER => 'M',
59 sentmod_INTER => '?',
60 sentmod_NA => '-',
61 );
62  
63 0 ▶sub setupSpec {
Subroutine setupSpec: not called CC=1 SCAR=6.9
Pod undocumented
64 0 $gov = $_[0];
65 }
66  
67 0 ▶sub make_TRt {
Subroutine make_TRt: not called CC=3 SCAR=24.8
Pod undocumented
68 0 my ($node,$machine)=@_;
69 0 my $result="";
70 0 foreach (qw(gender degcmp number tense aspect iterativeness verbmod deontmod sentmod)) {
71 0 ▶ if (exists($TRt{$_."_".$node->{$_}})) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $TRt{$_ . '_' . $node->{$_}}) { } 0 0 0
72 0 $result.=$TRt{$_."_".$node->{$_}};
73 } else {
74 0 $result.="X";
75 }
76 }
77 0 return $result;
78 }
79  
80 0 ▶sub make_gap {
Subroutine make_gap: not called CC=2 SCAR=17.9
Pod undocumented
81 0 my ($gap)=@_;
82 0 $gap=~s/(.)\</$1\n\</g;
83 0 ▶ if ($gap ne "") {
Branch: 1 branch
BranchTrueFalseTotal
if ($gap ne "") 0 0 0
84 0 $gap.="\n";
85 }
86 0 return $gap;
87 }
88  
89 0 ▶sub print_split_attr {
Subroutine print_split_attr: not called CC=3 SCAR=24.8
Pod undocumented
90 0 my ($fileref,$value,$tag)=@_;
91 0 ▶ return if $value eq "";
Branch: 1 branch
BranchTrueFalseTotal
if $value eq "" 0 0 0
92 0 foreach (split(/\|/,$value)) {
93 0 print $fileref "<$tag>",$_;
94 }
95 }
96  
97 0 ▶sub print_split_attr_with_num_attr {
Subroutine print_split_attr_with_num_attr: not called CC=4 SCAR=30.0
Pod undocumented
98 0 my ($fileref,$node,$attr,$num,$tag,$at)=@_;
99 0 ▶ return if $node->{$attr} eq "";
Branch: 1 branch
BranchTrueFalseTotal
if $node->{$attr} eq "" 0 0 0
100  
101 0 my @t=split(/\|/,translate_to_entities($node->{$attr}));
102 0 my @tw=split(/\|/,$node->{$num});
103 0 ▶ for (my $i=0;$i<=$#t;$i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#t) 0 0 0
104 0 ▶ if ($tw[$i]=~/(\d+)/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($tw[$i] =~ /(\d+)/) { } 0 0 0
105 0 print $fileref "<$tag $at=$1>",$t[$i];
106 } else {
107 0 print $fileref "<$tag>",$t[$i];
108 }
109 }
110 }
111  
112 0 ▶sub translate_to_entities {
Subroutine translate_to_entities: not called CC=2 SCAR=17.9
Pod undocumented
113 0 my ($t)=@_;
114 0 $t=~s/\</&lt;/g;
115 0 $t=~s/\>/&gt;/g;
116 0 ▶ if (length($t)==1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $t == 1) 0 0 0
117 0 $t=~s/\[/&lsqb;/g;
118 0 $t=~s/\]/&rsqb;/g;
119 0 $t=~s/\\\|/&verbar;/g;
120 0 $t=~s/\$/&dollar;/g;
121 }
122 0 return $t;
123 }
124  
125 0 ▶sub write {
Subroutine write: not called CC=137 SCAR=98.5
Pod undocumented
126 0 my ($fileref,$fsfile) = @_;
127 0 ▶ return unless ref($fsfile);
Branch: 1 branch
BranchTrueFalseTotal
unless ref $fsfile 0 0 0
128  
129 0 my @nodes;
130 my $node;
131  
132 # print the file information from the root node
133 0 my $root = $fsfile->treeList->[0];
134 0 ▶ if ($root) {
Branch: 1 branch
BranchTrueFalseTotal
if ($root) 0 0 0
135 0 ▶ my $lang = $root->{cstslang} ? $root->{cstslang} : "cs";
Branch: 1 branch
BranchTrueFalseTotal
$root->{'cstslang'} ? : 0 0 0
136 0 print $fileref "<csts lang=$lang>\n";
137 0 ▶ if ($root->{cstssource} ne "" or $root->{cstsmarkup} ne "") {
Branch: 1 branch
BranchTrueFalseTotal
if ($root->{"cstssource"} ne "" or $root->{"cstsmarkup"} ne "") 0 0 0
Condition0%0/3
$root->{"cstssource"} ne "" or $root->{"cstsmarkup"} ne ""
l!l&&r!l&&!r
000
MC/DC0%0/2
$root->{"cstssource"} ne "" or $root->{"cstsmarkup"} ne ""
$root->{"cstssource"} ne "" $root->{"cstsmarkup"} ne ""
Truth table0%0/3
A or B
A= $root->{"cstssource"} ne ""B= $root->{"cstsmarkup"} ne ""
ABresult
1X1
011
000
138 0 print $fileref "<h>\n";
139 0 print $fileref "<source>";
140 0 print $fileref $root->{cstssource};
141 0 print $fileref "</source>\n";
142 0 print $fileref "<markup>";
143 0 my $markup=$root->{cstsmarkup};
144 0 $markup=~s/(.)\<mauth/$1\<\/markup\>\<markup\>\<mauth/g;
145 0 $markup=~s/\</\n\</g;
146 0 print $fileref $markup;
147 0 print $fileref "\n</markup>\n";
148 0 print $fileref "</h>\n";
149 }
150 }
151 0 my $treeNo=0;
152 0 foreach $root ($fsfile->trees) {
153 0 $treeNo++;
154 0 @nodes=();
155 0 $node=$root->following;
156 0 ▶ while ($node) {
Branch: 1 branch
BranchTrueFalseTotal
if ($node) 0 0 0
157 0 push @nodes,$node;
158 0 $node=$node->following;
159 }
160 0 my $sentord=$fsfile->FS->sentord;
161 0 @nodes = sort { $a->{$sentord} <=> $b->{$sentord} } @nodes;
162 # print sentence information from root node
163 0 ▶ if (ref($root)) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $root) 0 0 0
164 0 ▶ if ($treeNo==1 or $root->{doc}.$root->{docid} ne "") {
Branch: 1 branch
BranchTrueFalseTotal
if ($treeNo == 1 or $root->{"doc"} . $root->{"docid"} ne "") 0 0 0
Condition0%0/3
$treeNo == 1 or $root->{"doc"} . $root->{"docid"} ne ""
l!l&&r!l&&!r
000
MC/DC0%0/2
$treeNo == 1 or $root->{"doc"} . $root->{"docid"} ne ""
$treeNo == 1 $root->{"doc"} . $root->{"docid"} ne ""
Truth table0%0/3
A or B
A= $treeNo == 1B= $root->{"doc"} . $root->{"docid"} ne ""
ABresult
1X1
011
000
165 0 ▶ if ($treeNo>1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($treeNo > 1) 0 0 0
166 0 print $fileref "</c>\n";
167 0 print $fileref "</doc>\n";
168 }
169 print $fileref "<doc file=\"",$root->{doc},"\" id=\"",
170 0 ▶ ($root->{docid}=~/^\d+$/ ? $root->{docid} : "0"),"\">\n";
Branch: 1 branch
BranchTrueFalseTotal
$root->{'docid'} =~ /^\d+$/ ? : 0 0 0
171 0 print $fileref "<a>\n";
172 0 ▶ if ($root->{docmarkup} =~ /\<m/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($root->{"docmarkup"} =~ /\<m/) 0 0 0
173 0 print $fileref "<markup>\n";
174 0 print $fileref $root->{docmarkup};
175 0 print $fileref "</markup>\n";
176 }
177 0 my ($genre,$id,$authname)=("mix",$root->{docid},"y");
178 my ($mod,$txtype,$med,$temp,$opus)=
179 0 $root->{doc}=~m!([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)!;
180 0 print $fileref "<mod>";
181 0 ▶ print $fileref $root->{docprolog} =~ /\<mod\>([^\<*]*)/ ?
Branch: 1 branch
BranchTrueFalseTotal
$root->{'docprolog'} =~ /\<mod\>([^\<*]*)/ ? : 0 0 0
182 $1 : $mod,"\n";
183 0 print $fileref "<txtype>";
184 0 ▶ print $fileref $root->{docprolog} =~ /\<txtype\>([^\<*]*)/ ?
Branch: 1 branch
BranchTrueFalseTotal
$root->{'docprolog'} =~ /\<txtype\>([^\<*]*)/ ? : 0 0 0
185 $1 : $txtype,"\n";
186 0 print $fileref "<genre>";
187 0 ▶ print $fileref $root->{docprolog} =~ /\<genre\>([^\<*]*)/ ?
Branch: 1 branch
BranchTrueFalseTotal
$root->{'docprolog'} =~ /\<genre\>([^\<*]*)/ ? : 0 0 0
188 $1 : $genre,"\n";
189 0 ▶ print $fileref "<verse>$1\n" if $root->{docprolog} =~ /\<verse\>([^\<*]*)/;
Branch: 1 branch
BranchTrueFalseTotal
if $root->{"docprolog"} =~ /\<verse\>([^\<*]*)/ 0 0 0
190 0 print $fileref "<med>";
191 0 ▶ print $fileref $root->{docprolog} =~ /\<med\>([^\<*]*)/ ?
Branch: 1 branch
BranchTrueFalseTotal
$root->{'docprolog'} =~ /\<med\>([^\<*]*)/ ? : 0 0 0
192 $1 : $med,"\n";
193 0 ▶ print $fileref "<authsex>$1\n" if $root->{docprolog} =~ /\<authsex\>([^\<*]*)/;
Branch: 1 branch
BranchTrueFalseTotal
if $root->{"docprolog"} =~ /\<authsex\>([^\<*]*)/ 0 0 0
194 0 ▶ print $fileref "<lang>$1\n" if $root->{docprolog} =~ /\<lang\>([^\<*]*)/;
Branch: 1 branch
BranchTrueFalseTotal
if $root->{"docprolog"} =~ /\<lang\>([^\<*]*)/ 0 0 0
195 0 ▶ print $fileref "<transsex>$1\n" if $root->{docprolog} =~ /\<transsex\>([^\<*]*)/;
Branch: 1 branch
BranchTrueFalseTotal
if $root->{"docprolog"} =~ /\<transsex\>([^\<*]*)/ 0 0 0
196 0 ▶ print $fileref "<srclang>$1\n" if $root->{docprolog} =~ /\<srclang\>([^\<*]*)/;
Branch: 1 branch
BranchTrueFalseTotal
if $root->{"docprolog"} =~ /\<srclang\>([^\<*]*)/ 0 0 0
197 0 print $fileref "<temp>";
198 0 ▶ print $fileref $root->{docprolog} =~ /\<temp\>([^\<*]*)/ ?
Branch: 1 branch
BranchTrueFalseTotal
$root->{'docprolog'} =~ /\<temp\>([^\<*]*)/ ? : 0 0 0
199 $1 : $temp,"\n";
200 0 ▶ print $fileref "<firsted>$1\n" if $root->{docprolog} =~ /\<firsted\>([^\<*]*)/;
Branch: 1 branch
BranchTrueFalseTotal
if $root->{"docprolog"} =~ /\<firsted\>([^\<*]*)/ 0 0 0
201 0 print $fileref "<authname>";
202 0 ▶ print $fileref $root->{docprolog} =~ /\<authname\>([^\<*]*)/ ?
Branch: 1 branch
BranchTrueFalseTotal
$root->{'docprolog'} =~ /\<authname\>([^\<*]*)/ ? : 0 0 0
203 $1 : $authname,"\n";
204 0 ▶ print $fileref "<transname>$1\n" if $root->{docprolog} =~ /\<transname\>([^\<*]*)/;
Branch: 1 branch
BranchTrueFalseTotal
if $root->{"docprolog"} =~ /\<transname\>([^\<*]*)/ 0 0 0
205 0 print $fileref "<opus>";
206 0 ▶ print $fileref $root->{docprolog} =~ /\<opus\>([^\<*]*)/ ?
Branch: 1 branch
BranchTrueFalseTotal
$root->{'docprolog'} =~ /\<opus\>([^\<*]*)/ ? : 0 0 0
207 $1 : $opus,"\n";
208 0 print $fileref "<id>";
209 0 ▶ print $fileref $root->{docprolog} =~ /\<id\>([^\<*]*)/ ?
Branch: 1 branch
BranchTrueFalseTotal
$root->{'docprolog'} =~ /\<id\>([^\<*]*)/ ? : 0 0 0
210 "$1\n" : "$id\n";
211 0 print $fileref "</a>\n";
212 }
213 0 ▶ if ($treeNo==1 or $root->{chap}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($treeNo == 1 or $root->{"chap"}) 0 0 0
Condition0%0/3
$treeNo == 1 or $root->{"chap"}
l!l&&r!l&&!r
000
MC/DC0%0/2
$treeNo == 1 or $root->{"chap"}
$treeNo == 1 $root->{"chap"}
Truth table0%0/3
A or B
A= $treeNo == 1B= $root->{"chap"}
ABresult
1X1
011
000
214 0 ▶ print $fileref "</c>\n" unless ($treeNo==1 or $root->{doc}.$root->{docid} ne "");
Branch: 1 branch
BranchTrueFalseTotal
unless $treeNo == 1 or $root->{"doc"} . $root->{"docid"} ne "" 0 0 0
Condition0%0/3
$treeNo == 1 or $root->{"doc"} . $root->{"docid"} ne ""
l!l&&r!l&&!r
000
MC/DC0%0/2
$treeNo == 1 or $root->{"doc"} . $root->{"docid"} ne ""
$treeNo == 1 $root->{"doc"} . $root->{"docid"} ne ""
Truth table0%0/3
A or B
A= $treeNo == 1B= $root->{"doc"} . $root->{"docid"} ne ""
ABresult
1X1
011
000
215 0 print $fileref "<c>\n";
216 }
217 0 ▶ if ($root->{para} or $treeNo==1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($root->{"para"} or $treeNo == 1) 0 0 0
Condition0%0/3
$root->{"para"} or $treeNo == 1
l!l&&r!l&&!r
000
MC/DC0%0/2
$root->{"para"} or $treeNo == 1
$root->{"para"} $treeNo == 1
Truth table0%0/3
A or B
A= $root->{"para"}B= $treeNo == 1
ABresult
1X1
011
000
218 0 ▶ my $n = $root->{para}=~/(\d+)/ ? $1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$root->{'para'} =~ /(\d+)/ ? : 0 0 0
219 0 print $fileref "<p n=$n>\n";
220 }
221 # print $fileref make_gap($root->{gappre});
222 0 my $id;
223 0 ▶ if ($compatibility_mode) {
Branch: 1 branch
BranchTrueFalseTotal
if ($compatibility_mode) { } 0 0 0
224 0 $id=$root->{ID1}.$root->{lemid}.$root->{commentTR};
225 } else {
226 0 $id=$root->{ID1};
227 }
228
229 0 ▶ if ($root->{form}=~/alt/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($root->{'form'} =~ /alt/) { } 0 0 0
230 0 print $fileref "<salt id=\"$id\">\n";
231 } else {
232 0 print $fileref "<s id=\"$id\">\n";
233 }
234 0 print $fileref make_gap($root->{gappost});
235 }
236 # print node information
237 0 foreach $node (@nodes) {
238 0 print $fileref make_gap($node->{gappre});
239 0 ▶ if ($node->{origf} ne $node->{form} or $node->{origfkind} and $node->{origfkind} ne 'same') {
Branch: 1 branch
BranchTrueFalseTotal
if ($node->{"origf"} ne $node->{"form"} or $node->{"origfkind"} and $node->{"origfkind"} ne "same") 0 0 0
Condition0%0/6
$node->{"origf"} ne $node->{"form"} or $node->{"origfkind"} and $node->{"origfkind"} ne "same"
l!l&&r!l&&!r
000
$node->{"origfkind"} and $node->{"origfkind"} ne "same"
!ll&&!rl&&r
000
MC/DC0%0/3
$node->{"origf"} ne $node->{"form"} or $node->{"origfkind"} and $node->{"origfkind"} ne "same"
$node->{"origf"} ne $node->{"form"} $node->{"origfkind"} $node->{"origfkind"} ne "same"
Truth table0%0/4
A or B and C
A= $node->{"origf"} ne $node->{"form"}B= $node->{"origfkind"}C= $node->{"origfkind"} ne "same"
ABCresult
1XX1
0111
00X0
0100
240 0 my @w=split(/\|/,translate_to_entities($node->{origf}));
241 0 my @k=split(/\|/,$node->{origfkind});
242 0 ▶ my $count=$#w > $#k ? $#w : $#k;
Branch: 1 branch
BranchTrueFalseTotal
$#w > $#k ? : 0 0 0
243 0 ▶ for (my $i=0; $i<=$count; $i++ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $count) 0 0 0
244 0 ▶ if ($k[$i] and $k[$i] ne 'same' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($k[$i] and $k[$i] ne 'same') { } 0 0 0
Condition0%0/3
$k[$i] and $k[$i] ne "same"
!ll&&!rl&&r
000
MC/DC0%0/2
$k[$i] and $k[$i] ne "same"
$k[$i] $k[$i] ne "same"
Truth table0%0/3
A and B
A= $k[$i]B= $k[$i] ne "same"
ABresult
0X0
100
111
245 0 print $fileref "<w $k[$i]>";
246 } else {
247 0 print $fileref "<w>";
248 }
249 0 print $fileref $w[$i],"\n";
250 }
251 }
252  
253 # choosing between f d and fadd
254 0 ▶ if (index($node->{ord},'.')>=$[) {
Branch: 1 branch
BranchTrueFalseTotal
if (index($node->{'ord'}, '.') >= $[) { } 0 0 0
255 0 ▶ my $del=$node->{del}=~/^(?:ELID|ELEX|EXPN|TRANSF)/i ? " ".lc($node->{del}) : "";
Branch: 1 branch
BranchTrueFalseTotal
$node->{'del'} =~ /^(?:ELID|ELEX|EXPN|TRANSF)/i ? : 0 0 0
256 0 ▶ my $TID = $node->{TID} ne '' ? " id=\"$node->{TID}\"" : "";
Branch: 1 branch
BranchTrueFalseTotal
$node->{'TID'} ne '' ? : 0 0 0
257 0 print $fileref "<fadd${TID}${del}>";
258 } else {
259 0 ▶ if ($compatibility_mode) {
Branch: 2 branches
BranchTrueFalseTotal
if ($compatibility_mode) { } 0 0 0
elsif ($node->{'form'} =~ m[^([][!"'()+,-./:;=\?`]|&(?:amp|ast|bsol|circ|commat|dollar|gt|lcub|lowbar|lsqb|lt|macron|num|percnt|rcub|rsqb|verbar);)$]) { } 0 0 0
260 0 ▶ if ($node->{gap1}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($node->{'gap1'}) { } 0 0 0
261 0 my $tags=$node->{gap1};
262 0 $tags=~s/\&nl;/\n/g;
263 0 ▶ $tags.="\n<f>" unless $tags=~/\<f/;
Branch: 1 branch
BranchTrueFalseTotal
unless $tags =~ /\<f/ 0 0 0
264 0 print $fileref $tags;
265 0 print $fileref translate_to_entities($node->{form});
266 } else {
267 0 print $fileref "<f>",translate_to_entities($node->{form});
268 }
269 } elsif ($node->{form}=~/^([][!"'()+,-.\/:;=\?`]|&(?:amp|ast|bsol|circ|commat|dollar|gt|lcub|lowbar|lsqb|lt|macron|num|percnt|rcub|rsqb|verbar);)$/) {
270 0 ▶ my $case = $node->{formtype} eq 'gen' ? " ".$node->{formtype} : "";
Branch: 1 branch
BranchTrueFalseTotal
$node->{'formtype'} eq 'gen' ? : 0 0 0
271 0 ▶ my $AID = $node->{AID} ne '' ? " id=\"$node->{AID}\"" : "";
Branch: 1 branch
BranchTrueFalseTotal
$node->{'AID'} ne '' ? : 0 0 0
272 0 print $fileref "<d$case$AID>",translate_to_entities($node->{form});
273 } else {
274 0 ▶ my $case = ($node->{formtype} ne "" and $node->{formtype} ne "lower") ? " ".$node->{formtype} : "";
Branch: 1 branch
BranchTrueFalseTotal
$node->{'formtype'} ne '' && $node->{'formtype'} ne 'lower' ? : 0 0 0
Condition0%0/3
$node->{"formtype"} ne "" and $node->{"formtype"} ne "lower"
!ll&&!rl&&r
000
MC/DC0%0/2
$node->{"formtype"} ne "" and $node->{"formtype"} ne "lower"
$node->{"formtype"} ne "" $node->{"formtype"} ne "lower"
Truth table0%0/3
A and B
A= $node->{"formtype"} ne ""B= $node->{"formtype"} ne "lower"
ABresult
0X0
100
111
275 0 ▶ my $AID = $node->{AID} ne '' ? " id=\"$node->{AID}\"" : "";
Branch: 1 branch
BranchTrueFalseTotal
$node->{'AID'} ne '' ? : 0 0 0
276 0 print $fileref "<f$case$AID>",$node->{form};
277 }
278 0 print_split_attr($fileref,$node->{punct},'P');
279 0 ▶ print $fileref "<Ct>",$node->{alltags} if ($node->{alltags} ne "");
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"alltags"} ne "" 0 0 0
280 0 ▶ if (($node->{lemma} ne '' || $node->{tag} ne '')
Branch: 1 branch
BranchTrueFalseTotal
if ($node->{"lemma"} ne "" || $node->{"tag"} ne "" and not $node->{"lemma"} eq "-" && $node->{"tag"} eq "-" or $node->{"root"} ne "" or $node->{"ending"} ne "") 0 0 0
Condition0%0/15
$node->{"lemma"} ne "" || $node->{"tag"} ne "" and not $node->{"lemma"} eq "-" && $node->{"tag"} eq "-" or $node->{"root"} ne "" or $node->{"ending"} ne ""
l!l&&r!l&&!r
000
$node->{"lemma"} ne "" || $node->{"tag"} ne "" and not $node->{"lemma"} eq "-" && $node->{"tag"} eq "-" or $node->{"root"} ne ""
l!l&&r!l&&!r
000
$node->{"lemma"} ne "" || $node->{"tag"} ne "" and not $node->{"lemma"} eq "-" && $node->{"tag"} eq "-"
!ll&&!rl&&r
000
$node->{"lemma"} ne "" or $node->{"tag"} ne ""
l!l&&r!l&&!r
000
$node->{'lemma'} eq '-' && $node->{'tag'} eq '-'
!ll&&!rl&&r
000
MC/DC0%0/6
$node->{"lemma"} ne "" || $node->{"tag"} ne "" and not $node->{"lemma"} eq "-" && $node->{"tag"} eq "-" or $node->{"root"} ne "" or $node->{"ending"} ne ""
$node->{"lemma"} ne "" $node->{"tag"} ne "" $node->{'lemma'} eq '-' $node->{'tag'} eq '-' $node->{"root"} ne "" $node->{"ending"} ne ""
Truth table0%0/13
A or B and not(C && D) or E or F
A= $node->{"lemma"} ne ""B= $node->{"tag"} ne ""C= $node->{'lemma'} eq '-'D= $node->{'tag'} eq '-'E= $node->{"root"} ne ""F= $node->{"ending"} ne ""
ABCDEFresult
1X0XXX1
1X10XX1
010XXX1
0110XX1
00XX1X1
1X111X1
01111X1
00XX011
1X11011
0111011
00XX000
1X11000
0111000
281 && !($node->{lemma} eq '-' && $node->{tag} eq '-')
282 || $node->{root} ne '' || $node->{ending} ne ''
283 ) {
284 0 print_split_attr($fileref,translate_to_entities($node->{lemma}),'l');
285 0 ▶ print $fileref "<R>",$node->{root} if ($node->{root} ne "");
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"root"} ne "" 0 0 0
286 0 ▶ print $fileref "<E>",$node->{ending} if ($node->{root} ne ""); # this is not a mistake
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"root"} ne "" 0 0 0
287  
288 0 print_split_attr_with_num_attr($fileref,$node,'tag','wt','t','w');
289 }
290 0 foreach (grep(/^lemmaMM_/,$fsfile->FS->attributes)) {
291 0 /lemmaMM_(.*)$/;
292 0 my $suf=$1;
293 0 print_split_attr($fileref,$node->{$_},"MMl src=\"$suf\"");
294 0 ▶ print $fileref "<R>",$node->{"rootMM_$suf"} if ($node->{"rootMM_$suf"} ne "");
Branch: 1 branch
BranchTrueFalseTotal
if $$node{"rootMM_$suf"} ne "" 0 0 0
295 # this is not a mistake
296 0 ▶ print $fileref "<E>",$node->{"endingMM_$suf"} if ($node->{"rootMM_$suf"} ne "");
Branch: 1 branch
BranchTrueFalseTotal
if $$node{"rootMM_$suf"} ne "" 0 0 0
297 0 print_split_attr($fileref,$node->{"tagMM_$suf"},"MMt src=\"$suf\"");
298 }
299 0 foreach (grep(/^lemmaMD_/,$fsfile->FS->attributes)) {
300 0 /lemmaMD_(.*)$/;
301 0 my $suf=$1;
302 0 print_split_attr_with_num_attr($fileref,$node,"lemmaMD_$suf","wMDl_$suf","MDl src=\"$suf\"",'w');
303 0 ▶ print $fileref "<R>",$node->{"rootMD_$suf"} if ($node->{"rootMD_$suf"} ne "");
Branch: 1 branch
BranchTrueFalseTotal
if $$node{"rootMD_$suf"} ne "" 0 0 0
304 # this is not a mistake
305 0 ▶ print $fileref "<E>",$node->{"endingMD_$suf"} if ($node->{"rootMD_$suf"} ne "");
Branch: 1 branch
BranchTrueFalseTotal
if $$node{"rootMD_$suf"} ne "" 0 0 0
306 0 print_split_attr_with_num_attr($fileref,$node,"tagMD_$suf","wMDt_$suf","MDt src=\"$suf\"",'w');
307 }
308 0 ▶ if ($node->{afun} and $node->{afun} ne "???") {
Branch: 1 branch
BranchTrueFalseTotal
if ($node->{"afun"} and $node->{"afun"} ne "???") 0 0 0
Condition0%0/3
$node->{"afun"} and $node->{"afun"} ne "???"
!ll&&!rl&&r
000
MC/DC0%0/2
$node->{"afun"} and $node->{"afun"} ne "???"
$node->{"afun"} $node->{"afun"} ne "???"
Truth table0%0/3
A and B
A= $node->{"afun"}B= $node->{"afun"} ne "???"
ABresult
0X0
100
111
309 0 my $afun_atrs="";
310 0 foreach my $afun (split(/\|/,$node->{afun})) {
311 0 print $fileref "<A";
312 0 ▶ $afun_atrs=join " ", grep { /./ && !/^no-/ } map { $node->{$_} }
Condition0%0/3
/./ && !/^no-/
!ll&&!rl&&r
000
MC/DC0%0/2
/./ && !/^no-/
/./ !/^no-/
Truth table0%0/3
A && not(B)
A= /./B= !/^no-/
ABresult
0X0
100
111
313 qw(parallel paren arabfa arabspec arabclaus);
314 0 ▶ print $fileref (($afun_atrs ne "") ? " $afun_atrs>" : ">"),$afun;
Branch: 1 branch
BranchTrueFalseTotal
$afun_atrs ne '' ? : 0 0 0
315 }
316 }
317 0 foreach (grep(/^afunMD_/,$fsfile->FS->attributes)) {
318 0 /afunMD_(.*)$/;
319 0 print_split_attr_with_num_attr($fileref,$node,"afunMD_$1","wMDA_$1","MDA src=\"$1\"",'w');
320 }
321 # TODO: PDAT-specific attributes for MDA not yet supported
322 }
323 0 my $quot="";
324 0 ▶ if ($node->{dsp}=~/(DSPP|DSPI|DSP)/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($node->{"dsp"} =~ /(DSPP|DSPI|DSP)/) 0 0 0
325 0 $quot=" ".lc($1);
326 }
327 0 ▶ if ($node->{quoted} eq 'QUOT') {
Branch: 1 branch
BranchTrueFalseTotal
if ($node->{"quoted"} eq "QUOT") 0 0 0
328 0 ▶ $quot.= $quot ? ".quot" : " quot";
Branch: 1 branch
BranchTrueFalseTotal
$quot ? : 0 0 0
329 }
330  
331 #
332 # TODO: we need a mechanism to find out when TR information
333 # is to be stored and when not
334 #
335 # we print <TRl> if there is a trlemma or dord orders nodes or
336 # there is a non-empty govTR and it is different from <g>
337 0 ▶ unless ($node->{del} eq 'TRANSF') {
Branch: 1 branch
BranchTrueFalseTotal
unless ($node->{"del"} eq "TRANSF") 0 0 0
338 0 ▶ if (($fsfile->FS->exists('trlemma') and exists($node->{trlemma}) and $node->{trlemma} ne "") or
Branch: 1 branch
BranchTrueFalseTotal
if ($fsfile->FS->exists("trlemma") and exists $node->{"trlemma"} and $node->{"trlemma"} ne "" or $fsfile->FS->order eq "dord") 0 0 0
Condition0%0/9
$fsfile->FS->exists("trlemma") and exists $node->{"trlemma"} and $node->{"trlemma"} ne "" or $fsfile->FS->order eq "dord"
l!l&&r!l&&!r
000
$fsfile->FS->exists("trlemma") and exists $node->{"trlemma"} and $node->{"trlemma"} ne ""
!ll&&!rl&&r
000
$fsfile->FS->exists("trlemma") and exists $node->{"trlemma"}
!ll&&!rl&&r
000
MC/DC0%0/4
$fsfile->FS->exists("trlemma") and exists $node->{"trlemma"} and $node->{"trlemma"} ne "" or $fsfile->FS->order eq "dord"
$fsfile->FS->exists("trlemma") exists $node->{"trlemma"} $node->{"trlemma"} ne "" $fsfile->FS->order eq "dord"
Truth table0%0/7
A and B and C or D
A= $fsfile->FS->exists("trlemma")B= exists $node->{"trlemma"}C= $node->{"trlemma"} ne ""D= $fsfile->FS->order eq "dord"
ABCDresult
111X1
0XX11
10X11
11011
0XX00
10X00
11000
339 $fsfile->FS->order eq 'dord'
340 # or
341 # ($fsfile->FS->exists('govTR') and
342 # exists($node->{govTR}) and
343 # $node->{govTR} ne "" and
344 # $node->{govTR} != $node->parent->{ord})
345 ) {
346  
347 0 print $fileref "<TRl$quot";
348 0 ▶ print $fileref " hidden" if ($node->{"TR"} eq "hide");
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"TR"} eq "hide" 0 0 0
349 print $fileref " origin=\"".join(" ",split /\|/,$node->{"AIDREFS"}).
350 0 ▶ "\"" if $node->{"AIDREFS"} ne "";
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"AIDREFS"} ne "" 0 0 0
351 0 print $fileref ">",translate_to_entities($node->{trlemma});
352  
353 0 ▶ if ($node->{func} ne "" or $node->{gram} ne "") {
Branch: 1 branch
BranchTrueFalseTotal
if ($node->{"func"} ne "" or $node->{"gram"} ne "") 0 0 0
Condition0%0/3
$node->{"func"} ne "" or $node->{"gram"} ne ""
l!l&&r!l&&!r
000
MC/DC0%0/2
$node->{"func"} ne "" or $node->{"gram"} ne ""
$node->{"func"} ne "" $node->{"gram"} ne ""
Truth table0%0/3
A or B
A= $node->{"func"} ne ""B= $node->{"gram"} ne ""
ABresult
1X1
011
000
354 0 print $fileref "<T>",$node->{func};
355 0 ▶ print $fileref "<grm>",$node->{gram} if ($node->{gram} !~ /^(?:---|\?\?\?)?$/);
Branch: 1 branch
BranchTrueFalseTotal
unless $node->{"gram"} =~ /^(?:---|\?\?\?)?$/ 0 0 0
356 }
357 print $fileref "<Tmo>",$node->{memberof} if ($node->{memberof} ne "" and
358 0 ▶ $node->{memberof} ne "???");
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"memberof"} ne "" and $node->{"memberof"} ne "???" 0 0 0
Condition0%0/3
$node->{"memberof"} ne "" and $node->{"memberof"} ne "???"
!ll&&!rl&&r
000
MC/DC0%0/2
$node->{"memberof"} ne "" and $node->{"memberof"} ne "???"
$node->{"memberof"} ne "" $node->{"memberof"} ne "???"
Truth table0%0/3
A and B
A= $node->{"memberof"} ne ""B= $node->{"memberof"} ne "???"
ABresult
0X0
100
111
359 print $fileref "<Tpa>",$node->{parenthesis} if ($node->{parenthesis} ne "" and
360 0 ▶ $node->{parenthesis} ne "???");
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"parenthesis"} ne "" and $node->{"parenthesis"} ne "???" 0 0 0
Condition0%0/3
$node->{"parenthesis"} ne "" and $node->{"parenthesis"} ne "???"
!ll&&!rl&&r
000
MC/DC0%0/2
$node->{"parenthesis"} ne "" and $node->{"parenthesis"} ne "???"
$node->{"parenthesis"} ne "" $node->{"parenthesis"} ne "???"
Truth table0%0/3
A and B
A= $node->{"parenthesis"} ne ""B= $node->{"parenthesis"} ne "???"
ABresult
0X0
100
111
361 print $fileref "<Top>",$node->{operand} if ($node->{operand} ne "" and
362 0 ▶ $node->{operand} ne "???");
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"operand"} ne "" and $node->{"operand"} ne "???" 0 0 0
Condition0%0/3
$node->{"operand"} ne "" and $node->{"operand"} ne "???"
!ll&&!rl&&r
000
MC/DC0%0/2
$node->{"operand"} ne "" and $node->{"operand"} ne "???"
$node->{"operand"} ne "" $node->{"operand"} ne "???"
Truth table0%0/3
A and B
A= $node->{"operand"} ne ""B= $node->{"operand"} ne "???"
ABresult
0X0
100
111
363 0 my $TRt=make_TRt($node,0);
364 0 ▶ print $fileref "<TRt>",$TRt unless ($TRt=~/^X*$/);
Branch: 1 branch
BranchTrueFalseTotal
unless $TRt =~ /^X*$/ 0 0 0
365 0 ▶ print $fileref "<tfa>",$node->{tfa} if ($node->{tfa} !~ /^(?:---|\?\?\?)?$/);
Branch: 1 branch
BranchTrueFalseTotal
unless $node->{"tfa"} =~ /^(?:---|\?\?\?)?$/ 0 0 0
366 0 ▶ print $fileref "<tfr>",$node->{dord} if ($node->{dord} ne "");
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"dord"} ne "" 0 0 0
367 0 ▶ print $fileref "<fw>",$node->{fw} if ($node->{fw} ne "");
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"fw"} ne "" 0 0 0
368 0 ▶ print $fileref "<phr>",$node->{phraseme} if ($node->{phraseme} ne "");
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"phraseme"} ne "" 0 0 0
369 0 ▶ print $fileref "<Tframeid>",$node->{frameid} if ($node->{frameid} ne "");
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"frameid"} ne "" 0 0 0
370 print $fileref "<Tframere>",translate_to_entities($node->{framere})
371 0 ▶ if ($node->{framere} ne "");
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"framere"} ne "" 0 0 0
372 0 ▶ if($gov eq 'govTR' or
Branch: 1 branch
BranchTrueFalseTotal
if ($gov eq 'govTR' or not defined $gov and $fsfile->FS->order eq 'dord') { } 0 0 0
Condition0%0/6
$gov eq "govTR" or not defined $gov and $fsfile->FS->order eq "dord"
l!l&&r!l&&!r
000
not defined $gov and $fsfile->FS->order eq "dord"
!ll&&!rl&&r
000
MC/DC0%0/3
$gov eq "govTR" or not defined $gov and $fsfile->FS->order eq "dord"
$gov eq "govTR" not defined $gov $fsfile->FS->order eq "dord"
Truth table0%0/4
A or not(B) and C
A= $gov eq "govTR"B= not defined $govC= $fsfile->FS->order eq "dord"
ABCresult
1XX1
0111
00X0
0100
373 !defined($gov) and $fsfile->FS->order eq 'dord') {
374 0 print $fileref "<TRg>",$node->parent->{ord};
375 } else {
376 0 ▶ print $fileref "<TRg>",$node->{govTR} if ($node->{govTR} ne "");
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"govTR"} ne "" 0 0 0
377 }
378 0 do {
379 0 my @corefs=split /\|/,$node->{coref};
380 0 my @cortypes=split /\|/,$node->{cortype};
381 0 foreach (@corefs) {
382 0 print $fileref "<coref ref=\"$_\" type=\"".shift(@cortypes)."\">";
383 }
384 0 foreach (split /\|/,$node->{corlemma}) {
385 0 print $fileref "<coref type=\"textual\">$_";
386 }
387 }
388 }
389 }
390 0 foreach (grep(/^trlemmaM_/,$fsfile->FS->attributes)) {
391 0 /^trlemmaM_(.*)$/;
392 0 print $fileref "<MTRl ";
393 0 ▶ print $fileref " hidden" if ($node->{"MTR_$1"} eq "hide");
Branch: 1 branch
BranchTrueFalseTotal
if $$node{"MTR_$1"} eq "hide" 0 0 0
394 0 print $fileref " src=\"$1\"";
395 0 ▶ print $fileref " origin=\"".join(" ",split /\|/,$node->{"MAIDREFS_$1"})."\"" if $node->{"MAIDREFS_$1"} ne "";;
Branch: 1 branch
BranchTrueFalseTotal
if $$node{"MAIDREFS_$1"} ne "" 0 0 0
396 0 print $fileref ">",$node->{$_};
397 # actually, all the set of MTRl subelements should be
398 # treated the same (plus hide
399 #
400 # TODO: IMPLEMENTATION MISSING
401 #
402 }
403 0 ▶ print $fileref "<r>",$node->{ord} if ($node->{ord} ne "");
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"ord"} ne "" 0 0 0
404 0 ▶ if ($node->{TID} eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($node->{"TID"} eq "") 0 0 0
405 0 ▶ if (defined($gov) and $gov ne 'ordorig'
Branch: 1 branch
BranchTrueFalseTotal
if (defined $gov and $gov ne 'ordorig' or not defined $gov and $fsfile->FS->order eq 'dord') { } 0 0 0
Condition0%0/9
defined $gov and $gov ne "ordorig" or not defined $gov and $fsfile->FS->order eq "dord"
l!l&&r!l&&!r
000
defined $gov and $gov ne "ordorig"
!ll&&!rl&&r
000
not defined $gov and $fsfile->FS->order eq "dord"
!ll&&!rl&&r
000
MC/DC0%0/4
defined $gov and $gov ne "ordorig" or not defined $gov and $fsfile->FS->order eq "dord"
defined $gov $gov ne "ordorig" not defined $gov $fsfile->FS->order eq "dord"
Truth table0%0/7
A and B or not(C) and D
A= defined $govB= $gov ne "ordorig"C= not defined $govD= $fsfile->FS->order eq "dord"
ABCDresult
11XX1
0X111
10111
0X0X0
0X100
100X0
10100
406 or
407 !defined($gov) and $fsfile->FS->order eq 'dord') {
408 0 ▶ print $fileref "<g>",$node->{ordorig} if $node->{ordorig} ne "";
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"ordorig"} ne "" 0 0 0
409 } else {
410 0 ▶ print $fileref "<g>",int($node->parent->{ord}) if (($export_dependency || $node->parent->{ord} ne "0") and $node->parent->{ord} ne "");
Branch: 1 branch
BranchTrueFalseTotal
if $export_dependency || $node->parent->{"ord"} ne 0 and $node->parent->{"ord"} ne "" 0 0 0
Condition0%0/6
$export_dependency || $node->parent->{"ord"} ne 0 and $node->parent->{"ord"} ne ""
!ll&&!rl&&r
000
$export_dependency or $node->parent->{"ord"} ne 0
l!l&&r!l&&!r
000
MC/DC0%0/3
$export_dependency || $node->parent->{"ord"} ne 0 and $node->parent->{"ord"} ne ""
$export_dependency $node->parent->{"ord"} ne 0 $node->parent->{"ord"} ne ""
Truth table0%0/5
A or B and C
A= $export_dependencyB= $node->parent->{"ord"} ne 0C= $node->parent->{"ord"} ne ""
ABCresult
00X0
1X00
0100
1X11
0111
411 }
412 }
413 0 ▶ unless (index($node->{ord},'.')>=$[) {
Branch: 1 branch
BranchTrueFalseTotal
unless (index($node->{"ord"}, ".") >= $[) 0 0 0
414 #not allowed in DTD for some reason
415 0 foreach (grep(/^govMD_/,$fsfile->FS->attributes)) {
416 0 ▶ if ($gov ne $_) {
Branch: 1 branch
BranchTrueFalseTotal
if ($gov ne $_) 0 0 0
417 0 /govMD_(.*)$/;
418 0 print_split_attr_with_num_attr($fileref,$node,"govMD_$1","wMDg_$1","MDg src=\"$1\"",'w');
419 }
420 }
421 0 ▶ if ($gov=~/^govMD_(.*)$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($gov =~ /^govMD_(.*)$/) 0 0 0
422 print $fileref "<MDg src=\"$1\"",
423 ($node->{"wMDg_$1"} ne "" ? "w=".$node->{"wMDg_$1"} : ""),
424 0 ▶ ">",$node->parent->{ord};
Branch: 1 branch
BranchTrueFalseTotal
$$node{"wMDg_$1"} ne '' ? : 0 0 0
425 }
426 }
427 0 ▶ if (join("",map { $node->{"wsd$_"} } qw(s ewn ili iliOffset)) ne "") {
Branch: 1 branch
BranchTrueFalseTotal
if (join("", map({$$node{"wsd$_"};} "s", "ewn", "ili", "iliOffset")) ne "") 0 0 0
428 print $fileref "<g",
429 0 join ("",map { " $_='".$node->{"wsd$_"}."'" } grep { $node->{"wsd$_"} ne "" }
430 qw(s ewn ili iliOffset)),">";
431 }
432 # get a list of <x> unique attributes
433 0 my %xtra;
434 @xtra{
435 0 @extra_attributes,
436 grep(/^x_/,$fsfile->FS->attributes())
437 }=();
438 0 foreach (sort {$a cmp $b} keys %xtra) {
439 0 my $name=$_; $name=~s/^x_//;
440 0 ▶ if ($gov ne "x_".$name) {
Branch: 1 branch
BranchTrueFalseTotal
if ($gov ne 'x_' . $name) 0 0 0
441 print $fileref "<x name=\"$name\">",
442 0 ▶ translate_to_entities($node->{$_}) if $node->{$_} ne "";
Branch: 1 branch
BranchTrueFalseTotal
if $node->{$_} ne "" 0 0 0
443 }
444 }
445 0 ▶ if ($gov =~ /^x_(.*)$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($gov =~ /^x_(.*)$/) 0 0 0
446 0 print $fileref "<x name=\"$1\">",$node->parent->{ord};
447 }
448 0 ▶ if ($preserve_err1 and $node->{err1} ne "") {
Branch: 1 branch
BranchTrueFalseTotal
if ($preserve_err1 and $node->{"err1"} ne "") 0 0 0
Condition0%0/3
$preserve_err1 and $node->{"err1"} ne ""
!ll&&!rl&&r
000
MC/DC0%0/2
$preserve_err1 and $node->{"err1"} ne ""
$preserve_err1 $node->{"err1"} ne ""
Truth table0%0/3
A and B
A= $preserve_err1B= $node->{"err1"} ne ""
ABresult
0X0
100
111
449 0 print $fileref "<err>",$node->{err1};
450 }
451 0 print $fileref "\n";
452 0 ▶ print $fileref "<D>\n" if ($node->{nospace});
Branch: 1 branch
BranchTrueFalseTotal
if $node->{"nospace"} 0 0 0
453 0 print $fileref make_gap($node->{gappost});
454 }
455 # print file ending
456 }
457 0 print $fileref "</c>\n";
458 0 print $fileref "</doc>\n";
459 0 print $fileref "</csts>\n";
460  
461 0 return 1;
462 }
463  
464 2 1;
↑ Summary PML/Instance/Reader.pm »