blib/lib/Lingua/Ogmios/NLPWrappers/BasicSentenceSegmentizer.pm

filter: Statementstmt 63.6% 156 / 245 Branchbran 43.3% 39 / 90 Conditioncond 45.2% 38 / 84 MC/DCmcdc 22.2% 10 / 45 Subroutinesub 100% 12 / 12 Podpod 0.0% 0 / 3 totaltotal 53.2% 255 / 479 CC 84 SCAR 43.2
CC
84
Cov
56%
run
182.4
_dots
136.1
_segmentation
37.4
CRAP 75.1
« blib/lib/Lingua/Ogmios/NLPWrappers/Distribution.pm ↑ Summary blib/lib/Lingua/Ogmios/NLPWrappers/HeidelTime.pm »
1 package Lingua::Ogmios::NLPWrappers::BasicSentenceSegmentizer;
2  
3  
4 6 our $VERSION='0.1';
5  
6  
7 6 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 6 ▶use Lingua::Ogmios::NLPWrappers::Wrapper;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 6 ▶use Lingua::Ogmios::Annotations::Sentence;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 # use Lingua::Identify qw(:language_identification);
14  
15 6 ▶use Lingua::Identify qw/langof set_active_languages/;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 # qw/langof set_active_languages/
18  
19 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 6 our @ISA = qw(Lingua::Ogmios::NLPWrappers::Wrapper);
23  
24 6 ▶sub new {
Subroutine new: called CC=6 SCAR=19.2
Pod undocumented
25 6 my ($class, $config, $tmpfile_prefix, $logfile, $position, $no_standard_output) = @_;
26 6 my $lang;
27 my $lang2;
28  
29 6 warn "[LOG] Creating a wrapper of the basic sentence segmentizer\n";
30  
31 6 my $SentenceSeg = $class->SUPER::new($config, $tmpfile_prefix, $logfile, $position, $no_standard_output);
32  
33 # if (scalar(keys %{$SentenceSeg->_config->configuration}) > 0) {
34 # $SentenceSeg->{'sentenceSeparatorCharList'}->{"FR"} = "?.!";
35 # $SentenceSeg->{'sentenceSeparatorCharList'}->{"EN"} = "?.!";
36 # warn "*** SENTENCESEPARATORCHARLIST is not set ***\n";
37 # }
38 6 ▶ if (defined $SentenceSeg->_config->configuration->{'CONFIG'}) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $SentenceSeg->_config->configuration->{'CONFIG'}) { } 2 4 6
39 2 foreach $lang (keys %{$SentenceSeg->_config->configuration->{'CONFIG'}}) {
40 6 ▶ if ($lang =~ /language=([\w]+)/io) {
Branch: 1 branch
BranchTrueFalseTotal
if ($lang =~ /language=([\w]+)/io) { } 6 0 6
41 6 $lang2 = $1;
42  
43 6 $SentenceSeg->_setOption($lang2, "LANG_LIST", "lang_list", "en,fr,de,es,it");
44 # warn "$lang2: " . $SentenceSeg->{"lang_list"}->{$lang2} . "\n";
45 6 $SentenceSeg->{"lang_list"}->{$lang2} = [split /[, ]/, $SentenceSeg->{"lang_list"}->{$lang2}];
46 # warn "$lang2: " . join('/', @{$SentenceSeg->{"lang_list"}->{$lang2}}) . "\n";
47  
48 6 ▶ if (exists $SentenceSeg->_config->configuration->{'CONFIG'}->{$lang}->{LANGID_METHODS}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $SentenceSeg->_config->configuration->{'CONFIG'}{$lang}{'LANGID_METHODS'}) { } 0 6 6
49 0 $SentenceSeg->{'lang_methods'}->{$lang2} = {'method' => $SentenceSeg->_config->configuration->{'CONFIG'}->{$lang}->{LANGID_METHODS}};
50 # warn Dumper($SentenceSeg->{'lang_methods'}->{$lang2});
51 } else {
52 6 $SentenceSeg->{'lang_methods'}->{$lang2} = {'method' => {
53 smallwords => 1,
54 prefixes1 => 0,
55 prefixes2 => 0,
56 prefixes3 => 0,
57 prefixes4 => 0,
58 suffixes1 => 1,
59 suffixes2 => 1,
60 suffixes3 => 1,
61 suffixes4 => 0,
62 ngrams1 => 1,
63 ngrams2 => 1.5,
64 ngrams3 => 0,
65 ngrams4 => 0,
66 },
67 };
68 # warn Dumper($SentenceSeg->{'lang_methods'}->{$lang2});
69 }
70  
71  
72 6 ▶ if (defined $SentenceSeg->_config->configuration->{'CONFIG'}->{$lang}->{"SENTENCESEPARATORCHARLIST"}) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $SentenceSeg->_config->configuration->{'CONFIG'}{$lang}{'SENTENCESEPARATORCHARLIST'}) { } 6 0 6
73 6 $SentenceSeg->{'sentenceSeparatorCharList'}->{$lang2} = $SentenceSeg->_config->configuration->{'CONFIG'}->{$lang}->{"SENTENCESEPARATORCHARLIST"};
74 } else {
75 0 $SentenceSeg->{'sentenceSeparatorCharList'}->{"FR"} = "?.!";
76 0 $SentenceSeg->{'sentenceSeparatorCharList'}->{"EN"} = "?.!";
77 0 warn "*** SENTENCESEPARATORCHARLIST is not set ***\n";
78 }
79 } else {
80 0 $SentenceSeg->{'sentenceSeparatorCharList'}->{"FR"} = "?.!";
81 0 $SentenceSeg->{'sentenceSeparatorCharList'}->{"EN"} = "?.!";
82 0 warn "*** SENTENCESEPARATORCHARLIST is not set ***\n";
83 }
84 }
85 } else {
86 4 $SentenceSeg->{'sentenceSeparatorCharList'}->{"FR"} = "?.!";
87 4 $SentenceSeg->{'lang_methods'}->{'FR'} = "en,fr,de,es,it";
88 4 $SentenceSeg->{'sentenceSeparatorCharList'}->{"EN"} = "?.!";
89 4 $SentenceSeg->{'lang_methods'}->{'EN'} = "en,fr,de,es,it";
90 }
91 # $SentenceSeg->_input_filename($tmpfile_prefix . ".SentSeg.in");
92 # $SentenceSeg->_output_filename($tmpfile_prefix . ".SentSeg.out");
93  
94 6 return($SentenceSeg);
95  
96 }
97  
98 6 ▶sub run {
Subroutine run: called CC=18 SCAR=52.1
Pod undocumented
99 6 my ($self, $documentSet) = @_;
100  
101 6 my $sentence;
102 my $document;
103 6 my $sentForm;
104  
105 # Set variables according the the configuration
106 6 $self->_documentSet($documentSet);
107  
108 6 ▶ if ($documentSet->[0]->getAnnotations->existsSentenceLevel) {
Branch: 1 branch
BranchTrueFalseTotal
if ($documentSet->[0]->getAnnotations->existsSentenceLevel) { } 0 6 6
109 0 warn "sentences exist in the first document\n";
110 0 warn " Assuming that no sentence segmentation is required for the current document set\n";
111 # return(0);
112 } else {
113 6 warn "[LOG] Sentence segmentizer... \n";
114  
115 6 $self->_segmentation;
116  
117 # Put log information
118 6 my $information = { 'software_name' => 'basic internal sentence segmentizer',
119 'comments' => 'Sentence Segmentation\n',
120 'command_line' => "",
121 'list_modified_level' => ['sentence_level'],
122 };
123 6 $self->_log($information);
124 6 foreach $document (@{$documentSet}) {
125 9 $document->getAnnotations->addLogProcessing(
126 Lingua::Ogmios::Annotations::LogProcessing->new(
127 { 'comments' => 'Found ' . $document->getAnnotations->getSentenceLevel->getSize . ' sentences\n',
128 }
129 )
130 );
131 }
132 }
133  
134 6 ▶ if ($self->_position eq "last") {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->_position eq "last") 0 6 6
135 0 ▶ if ($self->_no_standard_output eq "SENT") {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->_no_standard_output eq "SENT") 0 0 0
136 0 warn "print no standard output\n";
137
138 0 foreach $document (@{$documentSet}) {
139 0 foreach $sentence (@{$document->getAnnotations->getSentenceLevel->getElements}) {
140 0 $sentForm = $sentence->getForm;
141 0 print $sentForm;
142 0 ▶ if ($sentForm !~ /\n$/) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($sentForm =~ /\n$/) 0 0 0
143 0 print "\n";
144 }
145 }
146 }
147 }
148 0 ▶ if ($self->_no_standard_output eq "SENTLANG") {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->_no_standard_output eq "SENTLANG") 0 0 0
149 0 warn "print no standard output\n";
150
151 0 foreach $document (@{$documentSet}) {
152 0 foreach $sentence (@{$document->getAnnotations->getSentenceLevel->getElements}) {
153 0 $sentForm = $sentence->getForm;
154 0 $sentForm =~ s/\n/ /g;
155 # print $sentence->lang . "\t:\t" . $sentForm;
156 0 ▶ if (!defined $sentence->lang) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $sentence->lang) { } 0 0 0
157 0 print "INT";
158 } else {
159 0 print $sentence->lang;
160 }
161 0 print "\t:\t" . $sentForm;
162 0 ▶ if ($sentForm !~ /\n$/) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($sentForm =~ /\n$/) 0 0 0
163 0 print "\n";
164 }
165 }
166 }
167 }
168 0 ▶ if ($self->_no_standard_output eq "SENT+INFO") {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->_no_standard_output eq "SENT+INFO") 0 0 0
169 0 warn "print no standard output\n";
170 0 print "# detected language\t:\tsentence form\t:\tnb of chars (v1 -- length(form))\t:\tnb of chars (v2 -- offset diff)\t:\tnb of words\n";
171 0 foreach $document (@{$documentSet}) {
172 0 foreach $sentence (@{$document->getAnnotations->getSentenceLevel->getElements}) {
173 0 $sentForm = $sentence->getForm;
174 0 $sentForm =~ s/\n/ /g;
175 # print $sentence->lang . "\t:\t" . $sentForm;
176 0 ▶ if (!defined $sentence->lang) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $sentence->lang) { } 0 0 0
177 0 print "INT";
178 } else {
179 0 print $sentence->lang;
180 }
181 0 my $sentNbChar1 = length($sentForm);
182 0 my $sentNbChar2 = $sentence->end_token->getTo - $sentence->start_token->getFrom + 1;
183 0 my $sentNbWord = scalar(@{$sentence->getWordsFromSentence($document)});
184 0 chomp $sentForm;
185 0 print "\t:\t" . $sentForm;
186 0 print "\t:\t" . $sentNbChar1;
187 0 print "\t:\t" . $sentNbChar2;
188 0 print "\t:\t" . $sentNbWord;
189  
190 0 ▶ if ($sentForm !~ /\n$/) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($sentForm =~ /\n$/) 0 0 0
191 0 print "\n";
192 }
193 }
194 }
195 }
196 }
197  
198 6 $self->getTimer->_printTimesInLine($self->_config->name);
199 6 warn "[LOG] done\n";
200 }
201  
202 5307 ▶sub isSentenceEnd {
Subroutine isSentenceEnd: called CC=7 SCAR=22.0
Pod undocumented
203 5307 my ($self, $token, $lang, $doc_idx, $sent_form, $tokensTail, $document) = @_;
204
205 5307 my $endSent;
206 my $currenttoken;
207 5307 my $i;
208  
209 5307 ▶ if (!defined $lang) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $lang) 0 5307 5307
210 0 warn "language not defined, default is EN\n";
211 0 $lang = 'EN';
212 }
213 # warn "$lang\n";
214 # warn $self->{'sentenceSeparatorCharList'}->{$lang} . "\n";
215 # warn $$token->getContent . "\n";
216  
217 5307 ▶ if (index($self->{'sentenceSeparatorCharList'}->{$lang}, $$token->getContent) != -1) {
Branch: 1 branch
BranchTrueFalseTotal
if (index($self->{'sentenceSeparatorCharList'}{$lang}, $$token->getContent) != -1) { } 114 5193 5307
218 114 $endSent = 1;
219 } else {
220 5193 $endSent = 0;
221 }
222 # warn "$endSent\n";
223  
224 5307 ▶ if ($endSent == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($endSent == 1) 114 5193 5307
225 # warn "ckeck dots\n";
226 114 $endSent = $self->_dots($token, $lang, $doc_idx, $sent_form, $tokensTail, $document);
227  
228 # warn "ckeck acronyms\n";
229 114 ▶ $endSent &&= $self->_acronyms($$token, $lang, $doc_idx, $sent_form, $tokensTail, $document);
Condition33%1/3
$endSent &&= $self->_acronyms($$token, $lang, $doc_idx, $sent_form, $tokensTail, $document)
!ll&&!rl&&r
00114
MC/DC0%0/2
$endSent &&= $self->_acronyms($$token, $lang, $doc_idx, $sent_form, $tokensTail, $document)
$endSent $self->_acronyms($$token, $lang, $doc_idx, $sent_form, $tokensTail, $document)
Truth table33%1/3
A &&= B
A= $endSentB= $self->_acronyms($$token, $lang, $doc_idx, $sent_form, $tokensTail, $document)
ABresult
0X0
100
111
230  
231 # inside word
232 114 ▶ if ($document->getAnnotations->getWordLevel->existsElementFromIndex('list_refid_token', $$token->getId)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($document->getAnnotations->getWordLevel->existsElementFromIndex("list_refid_token", $$token->getId)) 0 114 114
233 # warn " " . $self->currentDocument->getAnnotations->getWordLevel->getElementByToken($$token)->[0]->end_token->getContent . "\n";
234 0 ▶ $endSent &&= $self->currentDocument->getAnnotations->getWordLevel->getElementByToken($$token)->[0]->end_token->equals($$token);
Condition0%0/3
$endSent &&= $self->currentDocument->getAnnotations->getWordLevel->getElementByToken($$token)->[0]->end_token->equals($$token)
!ll&&!rl&&r
000
MC/DC0%0/2
$endSent &&= $self->currentDocument->getAnnotations->getWordLevel->getElementByToken($$token)->[0]->end_token->equals($$token)
$endSent $self->currentDocument->getAnnotations->getWordLevel->getElementByToken($$token)->[0]->end_token->equals($$token)
Truth table0%0/3
A &&= B
A= $endSentB= $self->currentDocument->getAnnotations->getWordLevel->getElementByToken($$token)->[0]->end_token->equals($$token)
ABresult
0X0
100
111
235 # warn "==> $endSent\n";
236 }
237 # warn "$endSent\n";
238 # # case ...
239 # $i=0;
240 # $currenttoken = $$token;
241 # while(($i < 3) && ($currenttoken->getContent eq ".") && (defined $currenttoken->next)) {
242 # warn $currenttoken->getContent . "\n";
243 # $i++;
244 # $currenttoken = $currenttoken->next;
245 # }
246 # if (($i >= 3) && (defined $currenttoken)) {
247 # warn "No\n";
248 # $endSent = 0;
249  
250 # while(($currenttoken->isSep) && (defined $currenttoken->next)) {
251 # $currenttoken = $currenttoken->next;
252 # }
253 # if (defined $currenttoken) {
254 # warn $currenttoken->isAlpha . " : " . substr($currenttoken->getContent,0,1) . "\n";
255 # if ($currenttoken->getContent eq ')') {
256 # $endSent = 0;
257 # # $$doc_idx += 2;
258 # # if (defined $sent_form) {
259 # # $$sent_form .= $$token->getContent;
260 # # $$sent_form .= $$token->next->getContent;
261 # # $$token = $$token->next->next;
262 # # }
263 # # if (defined $tokensTail) {
264 # # push @$tokensTail, $$token;
265 # # push @$tokensTail, $$token->next;
266 # # }
267 # } elsif (($currenttoken->isAlpha) && (substr($currenttoken->getContent,0,1) eq uc(substr($currenttoken->getContent,0,1)) )) {
268 # $endSent = 1;
269 # } else {
270 # $endSent = 0;
271 # }
272 # $$doc_idx += 2;
273 # if (defined $sent_form) {
274 # $$sent_form .= $$token->getContent;
275 # $$sent_form .= $$token->next->getContent;
276 # $$token = $$token->next->next;
277 # }
278 # if (defined $tokensTail) {
279 # push @$tokensTail, $$token;
280 # push @$tokensTail, $$token->next;
281 # }
282 # }
283 # } else {
284 # $endSent = 1;
285 # }
286 }
287 # warn "-> $endSent\n";
288 5307 return($endSent);
289  
290 }
291  
292 114 ▶sub _acronyms {
Subroutine _acronyms: called CC=12 SCAR=30.2
293 114 my ($self, $token, $lang, $doc_idx, $sent_form, $tokensTail, $document) = @_;
294  
295 114 my %acronyms = ("etc" => 1, "etc." => 1,
296 "e.g." => 1, "e.g" => 1,
297 "i.e." => 1, "i.e" => 1,
298 );
299 114 my @words;
300 my $word;
301 114 my $i;
302 114 my $endSent = 1;
303 114 my $nextToken;
304  
305 114 $nextToken = $token->next;
306 114 ▶ while((defined $nextToken) && ($nextToken->isSep)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $nextToken and $nextToken->isSep) 111 114 225
Condition100%3/3
defined $nextToken and $nextToken->isSep
!ll&&!rl&&r
9105111
MC/DC100%2/2
defined $nextToken and $nextToken->isSep
defined $nextToken $nextToken->isSep
Truth table100%3/3
A and B
A= defined $nextTokenB= $nextToken->isSep
ABresult
0X0
100
111
307 111 $nextToken = $nextToken->next;
308 }
309  
310 # warn "===" . $token->getContent . "\n";
311 114 ▶ if ((defined $nextToken) && (defined $token->previous)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $nextToken and defined $token->previous) 105 9 114
Condition66%2/3
defined $nextToken and defined $token->previous
!ll&&!rl&&r
90105
MC/DC50%1/2
defined $nextToken and defined $token->previous
defined $nextToken defined $token->previous
Truth table66%2/3
A and B
A= defined $nextTokenB= defined $token->previous
ABresult
0X0
100
111
312 # warn " " . $nextToken->getContent . "\n";
313 # warn " " . $token->previous->getContent . "\n";
314 105 ▶ if ($document->getAnnotations->getSemanticUnitLevel->existsElementFromIndex("list_refid_token", $nextToken->getId)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($document->getAnnotations->getSemanticUnitLevel->existsElementFromIndex('list_refid_token', $nextToken->getId)) { } 0 105 105
315 0 $endSent = 0;
316 } else {
317 105 @words = @{$self->currentDocument->getAnnotations->getWordLevel->getElementByToken($token->previous)};
318 # if (scalar(@words) > 0) {
319 105 $i = 0;
320 # foreach $word (@words) {
321 # warn $word->getForm . "\n";
322 # }
323 105 ▶ while(($i < scalar(@words)) &&
Branch: 1 branch
BranchTrueFalseTotal
if ($i < scalar @words and not exists $acronyms{$words[$i]->getForm} || exists $acronyms{$words[$i]->getForm}) 0 105 105
Condition16%1/6
$i < scalar @words and not exists $acronyms{$words[$i]->getForm} || exists $acronyms{$words[$i]->getForm}
!ll&&!rl&&r
10500
exists $acronyms{$words[$i]->getForm} || exists $acronyms{$words[$i]->getForm}
l!l&&r!l&&!r
000
MC/DC0%0/3
$i < scalar @words and not exists $acronyms{$words[$i]->getForm} || exists $acronyms{$words[$i]->getForm}
$i < scalar @words exists $acronyms{$words[$i]->getForm} exists $acronyms{$words[$i]->getForm}
Truth table25%1/4
A and not(B || C)
A= $i < scalar @wordsB= exists $acronyms{$words[$i]->getForm}C= exists $acronyms{$words[$i]->getForm}
ABCresult
0XX0
11X0
1010
1001
324 (!(exists($acronyms{$words[$i]->getForm}) || (exists($acronyms{$words[$i]->getForm}))))) {
325 # warn "=> " . $words[$i]->getForm . "\n";
326 0 $i++;
327 }
328 105 ▶ if ($i < scalar(@words)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i < scalar @words) 0 105 105
329 # warn "OK: " . $nextToken->getContent . " " . substr($nextToken->getContent,0,1) . "\n";
330 0 ▶ if (($nextToken->isAlpha) && (substr($nextToken->getContent,0,1) eq uc(substr($nextToken->getContent,0,1)) )) {
Branch: 1 branch
BranchTrueFalseTotal
if ($nextToken->isAlpha and substr($nextToken->getContent, 0, 1) eq uc substr($nextToken->getContent, 0, 1)) { } 0 0 0
Condition0%0/3
$nextToken->isAlpha and substr($nextToken->getContent, 0, 1) eq uc substr($nextToken->getContent, 0, 1)
!ll&&!rl&&r
000
MC/DC0%0/2
$nextToken->isAlpha and substr($nextToken->getContent, 0, 1) eq uc substr($nextToken->getContent, 0, 1)
$nextToken->isAlpha substr($nextToken->getContent, 0, 1) eq uc substr($nextToken->getContent, 0, 1)
Truth table0%0/3
A and B
A= $nextToken->isAlphaB= substr($nextToken->getContent, 0, 1) eq uc substr($nextToken->getContent, 0, 1)
ABresult
0X0
100
111
331 # warn "OK2\n";
332 0 $endSent = 1;
333 } else {
334 0 $endSent = 0;
335 }
336 }
337 }
338 }
339 # warn "-> $endSent\n";
340 114 return($endSent);
341 }
342  
343 114 ▶sub _dots {
Subroutine _dots: called CC=18 SCAR=49.1
344 114 my ($self, $token, $lang, $doc_idx, $sent_form, $tokensTail, $document) = @_;
345  
346 114 my $endSent;
347 my $currenttoken;
348 114 my $i;
349  
350 # case ...
351 114 $i=0;
352 114 $currenttoken = $$token;
353 114 ▶ while(($i < 3) && ($currenttoken->getContent eq ".") && (defined $currenttoken->next)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i < 3 and $currenttoken->getContent eq "." and defined $currenttoken->next) 114 114 228
Condition66%4/6
$i < 3 and $currenttoken->getContent eq "." and defined $currenttoken->next
!ll&&!rl&&r
1140114
$i < 3 and $currenttoken->getContent eq "."
!ll&&!rl&&r
0114114
MC/DC33%1/3
$i < 3 and $currenttoken->getContent eq "." and defined $currenttoken->next
$i < 3 $currenttoken->getContent eq "." defined $currenttoken->next
Truth table50%2/4
A and B and C
A= $i < 3B= $currenttoken->getContent eq "."C= defined $currenttoken->next
ABCresult
0XX0
10X0
1100
1111
354 # warn $currenttoken->getContent . "\n";
355 114 $i++;
356 114 $currenttoken = $currenttoken->next;
357 }
358 114 ▶ if (($i >= 3) && (defined $currenttoken) &&
Branch: 1 branch
BranchTrueFalseTotal
if ($i >= 3 and defined $currenttoken and not $document->getAnnotations->getSectionLevel->existsElementFromIndex('to', $currenttoken->getId)) { } 0 114 114
Condition33%2/6
$i >= 3 and defined $currenttoken and not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $currenttoken->getId)
!ll&&!rl&&r
11400
$i >= 3 and defined $currenttoken
!ll&&!rl&&r
11400
MC/DC0%0/3
$i >= 3 and defined $currenttoken and not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $currenttoken->getId)
$i >= 3 defined $currenttoken not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $currenttoken->getId)
Truth table25%1/4
A and B and not(C)
A= $i >= 3B= defined $currenttokenC= not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $currenttoken->getId)
ABCresult
0XX0
10X0
1100
1111
359 (!$document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $currenttoken->getId))) {
360 # warn "No\n";
361 0 $endSent = 0;
362  
363 0 ▶ while(($currenttoken->isSep) && (defined $currenttoken->next) &&
Branch: 1 branch
BranchTrueFalseTotal
if ($currenttoken->isSep and defined $currenttoken->next and not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $currenttoken->getId)) 0 0 0
Condition0%0/6
$currenttoken->isSep and defined $currenttoken->next and not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $currenttoken->getId)
!ll&&!rl&&r
000
$currenttoken->isSep and defined $currenttoken->next
!ll&&!rl&&r
000
MC/DC0%0/3
$currenttoken->isSep and defined $currenttoken->next and not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $currenttoken->getId)
$currenttoken->isSep defined $currenttoken->next not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $currenttoken->getId)
Truth table0%0/4
A and B and not(C)
A= $currenttoken->isSepB= defined $currenttoken->nextC= not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $currenttoken->getId)
ABCresult
0XX0
10X0
1100
1111
364 (!$document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $currenttoken->getId))) {
365 0 $currenttoken = $currenttoken->next;
366 }
367 0 ▶ if (defined $currenttoken) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $currenttoken) 0 0 0
368 # warn $currenttoken->isAlpha . " : " . substr($currenttoken->getContent,0,1) . "\n";
369 0 ▶ if (($currenttoken->getContent eq ')') ||
Branch: 3 branches
BranchTrueFalseTotal
if ($currenttoken->getContent eq ')' or $document->getAnnotations->getSemanticUnitLevel->existsElementFromIndex('list_refid_token', $currenttoken->getId)) { } 0 0 0
elsif ($currenttoken->isAlpha and substr($currenttoken->getContent, 0, 1) eq uc substr($currenttoken->getContent, 0, 1)) { } 0 0 0
elsif (not $document->getAnnotations->getSectionLevel->existsElementFromIndex('to', $currenttoken->getId)) { } 0 0 0
Condition0%0/3
$currenttoken->getContent eq ")" or $document->getAnnotations->getSemanticUnitLevel->existsElementFromIndex("list_refid_token", $currenttoken->getId)
l!l&&r!l&&!r
000
MC/DC0%0/2
$currenttoken->getContent eq ")" or $document->getAnnotations->getSemanticUnitLevel->existsElementFromIndex("list_refid_token", $currenttoken->getId)
$currenttoken->getContent eq ")" $document->getAnnotations->getSemanticUnitLevel->existsElementFromIndex("list_refid_token", $currenttoken->getId)
Truth table0%0/3
A or B
A= $currenttoken->getContent eq ")"B= $document->getAnnotations->getSemanticUnitLevel->existsElementFromIndex("list_refid_token", $currenttoken->getId)
ABresult
1X1
011
000
370 ($document->getAnnotations->getSemanticUnitLevel->existsElementFromIndex("list_refid_token", $currenttoken->getId))) {
371 0 $endSent = 0;
372 # $$doc_idx += 2;
373 # if (defined $sent_form) {
374 # $$sent_form .= $$token->getContent;
375 # $$sent_form .= $$token->next->getContent;
376 # $$token = $$token->next->next;
377 # }
378 # if (defined $tokensTail) {
379 # push @$tokensTail, $$token;
380 # push @$tokensTail, $$token->next;
381 # }
382 ▶ } elsif (($currenttoken->isAlpha) && (substr($currenttoken->getContent,0,1) eq uc(substr($currenttoken->getContent,0,1)) )) {
Condition0%0/3
$currenttoken->isAlpha and substr($currenttoken->getContent, 0, 1) eq uc substr($currenttoken->getContent, 0, 1)
!ll&&!rl&&r
000
MC/DC0%0/2
$currenttoken->isAlpha and substr($currenttoken->getContent, 0, 1) eq uc substr($currenttoken->getContent, 0, 1)
$currenttoken->isAlpha substr($currenttoken->getContent, 0, 1) eq uc substr($currenttoken->getContent, 0, 1)
Truth table0%0/3
A and B
A= $currenttoken->isAlphaB= substr($currenttoken->getContent, 0, 1) eq uc substr($currenttoken->getContent, 0, 1)
ABresult
0X0
100
111
383 0 $endSent = 1;
384 } elsif (!$document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $currenttoken->getId)) {
385 0 $endSent = 1;
386 } else {
387 0 $endSent = 0;
388 }
389 0 $$doc_idx += 2;
390 0 ▶ if (defined $sent_form) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $sent_form) 0 0 0
391 0 $$sent_form .= $$token->getContent;
392 0 $$sent_form .= $$token->next->getContent;
393 0 $$token = $$token->next->next;
394 }
395 0 ▶ if (defined $tokensTail) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $tokensTail) 0 0 0
396 0 push @$tokensTail, $$token;
397 0 push @$tokensTail, $$token->next;
398 }
399 }
400 } else {
401 114 $endSent = 1;
402 }
403 114 return($endSent);
404 }
405  
406 6 ▶sub _segmentation {
Subroutine _segmentation: called CC=28 SCAR=36.2
407 6 my ($self) = @_;
408  
409 6 my $start_token;
410 my $end_token;
411  
412 6 my $document;
413 6 my $doc_idx;
414 6 my $lang;
415 6 my $token;
416 6 my $isNE;
417 6 my $isWord;
418  
419 6 my $beginSection;
420 6 my $endSection;
421  
422 6 my $sentence;
423 6 my $sentence_form;
424  
425 6 foreach $document (@{$self->_documentSet}) {
426 9 $lang = $document->getAnnotations->getLanguage;
427 9 $self->currentDocument($document);
428  
429 9 $doc_idx = 0;
430 9 $start_token = undef; # $document->getAnnotations->getSectionLevel->getElements->[0];
431 9 $end_token = undef;
432  
433 # warn "Processing document " . $document ->getId . "\n";
434  
435 9 ▶ for($doc_idx = 0; $doc_idx < scalar(@{$document->getAnnotations->getTokenLevel->getElements});$doc_idx++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;}) 132 9 141
436 do {
437 177 $token = $document->getAnnotations->getTokenLevel->getElements->[$doc_idx];
438 177 $doc_idx++;
439 132 ▶ } while(($doc_idx < scalar(@{$document->getAnnotations->getTokenLevel->getElements})) && ($token->isSep));
Branch: 1 branch
BranchTrueFalseTotal
$doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;} and $token->isSep and do { do { $token = $document->getAnnotations->getTokenLevel->getElements->[$doc_idx]; ++$doc_idx } } 45 132 177
Condition100%3/3
$doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;} and $token->isSep
!ll&&!rl&&r
912345
MC/DC100%2/2
$doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;} and $token->isSep
$doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;} $token->isSep
Truth table100%3/3
A and B
A= $doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;}B= $token->isSep
ABresult
0X0
100
111
440 132 $doc_idx--;
441 132 $start_token = $token;
442 132 $sentence_form = "";
443 # warn $self->isSentenceEnd(\$token, $lang, \$doc_idx, \$sentence_form, undef, $document) . "\n";
444  
445 # TODO take into account a NE follown by a capitalized word (which is not a NE)
446 # while(($doc_idx < scalar(@{$document->getAnnotations->getTokenLevel->getElements})) &&
447 # ((!($self->isSentenceEnd(\$token, $lang, \$doc_idx, \$sentence_form, undef))) ||
448 # ($document->getAnnotations->getSemanticUnitLevel->existsElementFromIndex("list_refid_token", $token->getId)) ||
449 # ($document->getAnnotations->getWordLevel->existsElementFromIndex("list_refid_token", $token->getId))) &&
450 # (!$document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $token->getId))) {
451 132 ▶ while(($doc_idx < scalar(@{$document->getAnnotations->getTokenLevel->getElements})) &&
Branch: 1 branch
BranchTrueFalseTotal
if ($doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;} and not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $token->getId) and not $self->isSentenceEnd(\$token, $lang, \$doc_idx, \$sentence_form, undef, $document)) 4890 132 5022
Condition83%5/6
$doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;} and not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $token->getId) and not $self->isSentenceEnd(\$token, $lang, \$doc_idx, \$sentence_form, undef, $document)
!ll&&!rl&&r
181144890
$doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;} and not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $token->getId)
!ll&&!rl&&r
0185004
MC/DC66%2/3
$doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;} and not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $token->getId) and not $self->isSentenceEnd(\$token, $lang, \$doc_idx, \$sentence_form, undef, $document)
$doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;} not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $token->getId) not $self->isSentenceEnd(\$token, $lang, \$doc_idx, \$sentence_form, undef, $document)
Truth table75%3/4
A and not(B) and not(C)
A= $doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;}B= not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $token->getId)C= not $self->isSentenceEnd(\$token, $lang, \$doc_idx, \$sentence_form, undef, $document)
ABCresult
0XX0
10X0
1100
1111
452 (!$document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $token->getId)) &&
453 (!$self->isSentenceEnd(\$token, $lang, \$doc_idx, \$sentence_form, undef, $document)) #&&
454 # (
455 # # ($document->getAnnotations->getWordLevel->existsElementFromIndex("list_refid_token", $token->getId))
456 # || ($document->getAnnotations->getSemanticUnitLevel->existsElementFromIndex("list_refid_token", $token->getId)))
457 # )
458 ) {
459 4890 $sentence_form .= $token->getContent;
460 # warn $token->getContent. "\n";
461 # warn $document->getAnnotations->getSemanticUnitLevel->existsElementFromIndex("list_refid_token", $token->getId) . "\n";
462 # warn $document->getAnnotations->getWordLevel->existsElementFromIndex("list_refid_token", $token->getId) . "\n";
463 # warn "$sentence_form (1)\n";
464 4890 $end_token = $token;
465 4890 $doc_idx++;
466 4890 $token = $document->getAnnotations->getTokenLevel->getElements->[$doc_idx];
467 # warn $self->isSentenceEnd(\$token, $lang, \$doc_idx, \$sentence_form, undef, $document) . "\n";
468 }
469 # warn "$sentence_form (1b)\n";
470 132 ▶ if ($doc_idx < scalar(@{$document->getAnnotations->getTokenLevel->getElements})) {
Branch: 1 branch
BranchTrueFalseTotal
if ($doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;}) 132 0 132
471 132 $sentence_form .= $token->getContent;
472 # warn "$sentence_form (2)\n";
473 132 $end_token = $token;
474 132 ▶ if (!$document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $token->getId)) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $token->getId)) 114 18 132
475 114 my $end_token_tail = $token;
476 114 my $sentence_form_tail = "";
477 114 my @tokensTail;
478 114 my $tail = 0;
479 do {
480
481 198 $end_token_tail = $end_token_tail->next;
482 198 ▶ if (defined $end_token_tail) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $end_token_tail) 198 0 198
483 198 ▶ $tail ||= $self->isSentenceEnd(\$end_token_tail, $lang, \$doc_idx, \$sentence_form_tail, \@tokensTail, $document);
Condition33%1/3
$tail ||= $self->isSentenceEnd(\$end_token_tail, $lang, \$doc_idx, \$sentence_form_tail, \@tokensTail, $document)
l!l&&r!l&&!r
00198
MC/DC0%0/2
$tail ||= $self->isSentenceEnd(\$end_token_tail, $lang, \$doc_idx, \$sentence_form_tail, \@tokensTail, $document)
$tail $self->isSentenceEnd(\$end_token_tail, $lang, \$doc_idx, \$sentence_form_tail, \@tokensTail, $document)
Truth table33%1/3
A ||= B
A= $tailB= $self->isSentenceEnd(\$end_token_tail, $lang, \$doc_idx, \$sentence_form_tail, \@tokensTail, $document)
ABresult
1X1
011
000
484 198 push @tokensTail, $end_token_tail;
485 198 $sentence_form_tail .= $end_token_tail->getContent;
486 # warn "$sentence_form_tail (3)\n";
487 }
488 198 $doc_idx++;
489 114 ▶ } while (($doc_idx < scalar(@{$document->getAnnotations->getTokenLevel->getElements}))
Branch: 1 branch
BranchTrueFalseTotal
$doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;} and not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $end_token_tail->getId) and $end_token_tail->isSep || $self->isSentenceEnd(\$end_token_tail, $lang, \$doc_idx, undef, undef, $document) and do { do { $end_token_tail = $end_token_tail->next; if (defined $end_token_tail) { $tail ||= $self->isSentenceEnd(\$end_token_tail, $lang, \$doc_idx, \$sentence_form_tail, \@tokensTail, $document); push @tokensTail, $end_token_tail; $sentence_form_tail .= $end_token_tail->getContent; } ; ++$doc_idx } } 84 114 198
Condition77%7/9
$doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;} and not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $end_token_tail->getId) and $end_token_tail->isSep || $self->isSentenceEnd(\$end_token_tail, $lang, \$doc_idx, undef, undef, $document)
!ll&&!rl&&r
910584
$doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;} and not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $end_token_tail->getId)
!ll&&!rl&&r
09189
$end_token_tail->isSep or $self->isSentenceEnd(\$end_token_tail, $lang, \$doc_idx, undef, undef, $document)
l!l&&r!l&&!r
840105
MC/DC50%2/4
$doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;} and not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $end_token_tail->getId) and $end_token_tail->isSep || $self->isSentenceEnd(\$end_token_tail, $lang, \$doc_idx, undef, undef, $document)
$doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;} not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $end_token_tail->getId) $end_token_tail->isSep $self->isSentenceEnd(\$end_token_tail, $lang, \$doc_idx, undef, undef, $document)
Truth table60%3/5
A and not(B) and C or D
A= $doc_idx < scalar @{$document->getAnnotations->getTokenLevel->getElements;}B= not $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $end_token_tail->getId)C= $end_token_tail->isSepD= $self->isSentenceEnd(\$end_token_tail, $lang, \$doc_idx, undef, undef, $document)
ABCDresult
0XXX0
10XX0
11000
111X1
11011
490 && (!$document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $end_token_tail->getId))
491 && (($end_token_tail->isSep) || ($self->isSentenceEnd(\$end_token_tail, $lang, \$doc_idx, undef, undef, $document))));
492 114 $doc_idx--;
493 114 ▶ if ($tail) {
Branch: 1 branch
BranchTrueFalseTotal
if ($tail) 0 114 114
494 0 pop @tokensTail;
495 0 ▶ while((scalar(@tokensTail) > 0) && ($tokensTail[$#tokensTail]->isSep)) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @tokensTail > 0 and $tokensTail[$#tokensTail]->isSep) 0 0 0
Condition0%0/3
scalar @tokensTail > 0 and $tokensTail[$#tokensTail]->isSep
!ll&&!rl&&r
000
MC/DC0%0/2
scalar @tokensTail > 0 and $tokensTail[$#tokensTail]->isSep
scalar @tokensTail > 0 $tokensTail[$#tokensTail]->isSep
Truth table0%0/3
A and B
A= scalar @tokensTail > 0B= $tokensTail[$#tokensTail]->isSep
ABresult
0X0
100
111
496 0 pop @tokensTail;
497 }
498 0 ▶ if (scalar(@tokensTail) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @tokensTail > 0) 0 0 0
499 0 foreach my $tk (@tokensTail) {
500 0 $sentence_form .= $tk->getContent;
501 # warn "$sentence_form (4)\n";
502 }
503 0 $end_token = $tokensTail[$#tokensTail];
504 }
505 }
506 }
507 }
508  
509 132 ▶ if ((defined $start_token) &&
Branch: 1 branch
BranchTrueFalseTotal
if (defined $start_token and $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $start_token->getId) == 1 && !($start_token->equals($end_token) && $start_token->isSep) || defined $end_token && !$start_token->equals($end_token)) 123 9 132
Condition60%9/15
defined $start_token and $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $start_token->getId) == 1 && !($start_token->equals($end_token) && $start_token->isSep) || defined $end_token && !$start_token->equals($end_token)
!ll&&!rl&&r
09123
$document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $start_token->getId) == 1 and not $start_token->equals($end_token) && $start_token->isSep or defined $end_token and not $start_token->equals($end_token)
l!l&&r!l&&!r
01239
$document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $start_token->getId) == 1 and not $start_token->equals($end_token) && $start_token->isSep
!ll&&!rl&&r
12390
$start_token->equals($end_token) && $start_token->isSep
!ll&&!rl&&r
009
defined $end_token and not $start_token->equals($end_token)
!ll&&!rl&&r
09123
MC/DC0%0/6
defined $start_token and $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $start_token->getId) == 1 && !($start_token->equals($end_token) && $start_token->isSep) || defined $end_token && !$start_token->equals($end_token)
defined $start_token $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $start_token->getId) == 1 $start_token->equals($end_token) $start_token->isSep defined $end_token not $start_token->equals($end_token)
Truth table22%2/9
A and B and not(C && D) or E and not(F)
A= defined $start_tokenB= $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $start_token->getId) == 1C= $start_token->equals($end_token)D= $start_token->isSepE= defined $end_tokenF= not $start_token->equals($end_token)
ABCDEFresult
0XXXXX0
10XX0X0
10XX100
11110X0
1111100
110XXX1
1110XX1
10XX111
1111111
510 ((($document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $start_token->getId) == 1)
511 && ((! $start_token->equals($end_token)) || (!$start_token->isSep)))
512 || ((defined $end_token) && (! $start_token->equals($end_token))))) {
513  
514 0 ▶ if (!defined ($end_token)) {$end_token = $start_token;};
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $end_token) 0 123 123
515  
516 # my $method = {'method' => {
517 # smallwords => 1,
518 # prefixes1 => 0,
519 # prefixes2 => 0,
520 # prefixes3 => 0,
521 # prefixes4 => 0,
522 # suffixes1 => 1,
523 # suffixes2 => 1,
524 # suffixes3 => 1,
525 # suffixes4 => 0,
526 # ngrams1 => 1,
527 # ngrams2 => 1.5,
528 # ngrams3 => 0,
529 # ngrams4 => 0,
530 # },
531 # };
532  
533 # warn Dumper($method);
534  
535 # 'active-languages' => [ 'en', 'de', 'fr'],
536 # 'max-size' => 50,
537 # warn "$lang: " . join('/', @{$self->{"lang_list"}->{$lang}}) . "\n";
538 123 set_active_languages(@{$self->{"lang_list"}->{$lang}}); # qw/en fr de es it/); #
539 # warn "lang of the sentence $sentence_form : " . langof($method, $sentence_form) . "\n";
540 # warn "start sentence at " . $start_token->getId . "\n";
541 # warn "end sentence at " . $end_token->getId . "\n";
542 # warn "Sentence: $sentence_form\n";
543 123 my $sentence = Lingua::Ogmios::Annotations::Sentence->new(
544 {'form' => $sentence_form,
545 'refid_start_token' => $start_token,
546 'refid_end_token' => $end_token,
547 });
548 123 $sentence->lang(langof($self->{'lang_methods'}->{$lang}, $sentence_form)); #
549  
550 123 $document->getAnnotations->addSentence($sentence);
551 }
552
553  
554 # $isNE = $document->getAnnotations->getSemantic_UnitLevel->existsElementFromIndex("list_refid_token", $token->getId);
555 # $isWord = $document->getAnnotations->getWordLevel->existsElementFromIndex("list_refid_token", $token->getId);
556  
557 # $beginSection = $document->getAnnotations->getSectionLevel->existsElementFromIndex("from", $token->getId);
558  
559 # $endSection = $document->getAnnotations->getSectionLevel->existsElementFromIndex("to", $token->getId);
560  
561
562  
563 # warn "Token(" . $token->getType . "): " . $token->getId . " , " . ($isNE * 1) . " , " . ($isWord * 1) . " , " . ($beginSection * 1) . " , " . ($endSection * 1) . "\n";
564  
565
566  
567 # if ($token->isSep) {
568 # warn "Token(" . $token->getType . "): " . $token->getId . " , " . ($isNE * 1) . " , " . ($isWord * 1) . " , " . ($beginSection * 1) . " , " . ($endSection * 1) . "\n";
569
570 # }
571  
572 }
573 }
574  
575 }
576  
577 6 1;
578  
579  
580 __END__
« blib/lib/Lingua/Ogmios/NLPWrappers/Distribution.pm ↑ Summary blib/lib/Lingua/Ogmios/NLPWrappers/HeidelTime.pm »