Branch Coverage

blib/lib/Lingua/YaTeA/Corpus.pm
Criterion Covered Total %
branch 100 236 42.3


line true false branch
57 288 9 if ($word =~ /^([^\t]+)\t([^\t]+)\t([^\t]+)$/ and $2 ne $sentence_boundary and $2 ne $document_boundary)
65 288 0 if ($match_type ne 'strict') { }
68 288 0 if ($match_type eq 'loose')
93 0 20 if (defined $language and $language eq 'FR-Flemm') { }
104 0 0 if (scalar @elems > 3)
110 0 0 if (scalar @elems == 3)
113 0 0 if (scalar @septags == 2) { }
0 0 elsif (scalar @septags == 3) { }
121 0 0 if ($tag eq 'PUN(CIT)')
127 0 0 if ($elems[0] eq 'une')
131 0 0 if ($tag =~ /Vmpp/)
135 0 0 if (lc $elems[0] eq 'l')
140 0 0 if (scalar @elems == 3)
215 20 0 unless ($fh->eof)
232 598 0 if ($line =~ /(\n+)$/)
241 4 594 if (not $line =~ /^[^\t]*\t[^\t]+\t[^\t]*$/o) { }
247 0 4 if (scalar @elems > 3) { }
253 0 4 if (defined $elems[0] and length $elems[0] > 0) { }
255 0 0 unless (defined $elems[1])
264 0 4 if (scalar @elems == 3) { }
289 612 0 unless ($word =~ /^\s*$/)
302 594 18 if ($form =~ /^[^\t]*\t[^\t]+\t[^\t]*$/o) { }
306 12 6 if ($form =~ m[\
312 6 0 if ($form =~ m[\
332 594 18 if (&blessed($word) and $word->isa('Lingua::YaTeA::WordFromCorpus'))
335 18 576 if ($word->isSentenceBoundary($sentence_boundary)) { }
343 0 576 if ($word->isDocumentBoundary($document_boundary)) { }
371 0 0 if (&blessed($word) and $word->isa('Lingua::YaTeA::WordFromCorpus')) { }
373 0 0 if ($word->isSentenceBoundary($sentence_boundary)) { }
379 0 0 if ($word->isDocumentBoundary($document_boundary)) { }
404 10 10 if (defined $testified_set and $testified_set->size > 0)
406 297 16 if ($word =~ /^([^\t]+)\t([^\t]+)\t([^\t]+)$/)
407 297 0 if ($match_type ne 'strict') { }
409 297 0 if ($match_type eq 'loose')
419 3 7 if ($testified->isInLexicon(\%block_lexicon, $match_type) == 1)
439 20 0 if (defined $selected_TTs_h)
477 580 280 if ($action eq 'delete') { }
481 280 0 if ($action eq 'split')
527 612 2 if (defined $fh and defined $word)
535 248 366 if ($i == $this->size or $word->isChunkEnd(\$action, \$split_after, $sentence_boundary, $document_boundary, $chunking_data) == 1) { }
548 122 126 if ($valid == 1)
563 594 18 if (defined $word and (&blessed($word) and $word->isa('Lingua::YaTeA::WordFromCorpus')))
580 124 124 if ($this->pruneFromStart($words_a, $chunking_data, $FS_set, $fh) == 1)
583 122 2 if ($this->pruneFromEnd($words_a, $chunking_data, $FS_set, $fh) == 1)
585 122 0 if ($this->checkCompulsory($words_a, $compulsory, $fh) == 1)
609 286 6 if (&blessed($word) and $word->isa('Lingua::YaTeA::WordFromCorpus')) { }
611 250 36 if ($tag_set->existTag('CANDIDATES', $word->getPOS))
620 6 0 if (&blessed($word) and $word->isa('Lingua::YaTeA::TestifiedTermMark'))
622 3 3 if ($word->isOpener) { }
629 3 0 if ($word->isCloser)
660 2 186 if (&blessed($word) and $word->isa('Lingua::YaTeA::TestifiedTermMark')) { }
666 182 4 if (&blessed($word) and $word->isa('Lingua::YaTeA::WordFromCorpus'))
669 122 60 if ($word->isCleaningFrontier($chunking_data))
671 25 97 if ($potential_FS_a = $word->isStartTrigger($FS_set->getTriggerSet('START'))) { }
679 25 0 unless ($this->expandStartTriggers($potential_FS_a, $words_a, $fh))
695 122 124 if (scalar @$words_a > 0)
716 0 132 if (&blessed($word) and $word->isa('Lingua::YaTeA::TestifiedTermMark')) { }
722 132 0 if (&blessed($word) and $word->isa('Lingua::YaTeA::WordFromCorpus'))
724 126 6 if ($word->isCleaningFrontier($chunking_data))
727 4 122 if ($inside_testified == 0 and (&blessed($word) and $word->isa('Lingua::YaTeA::WordFromCorpus')) and $potential_FS_a = $word->isEndTrigger($FS_set->getTriggerSet('END'))) { }
735 0 4 if (not $this->expandEndTriggers($potential_FS_a, $words_a, $fh)) { }
742 2 2 if (scalar @$words_a == 0) { }
758 0 8 if (&blessed($word) and $word->isa('Lingua::YaTeA::ForbiddenStructureMark')) { }
765 6 2 if ($deleted == 0)
776 122 0 if (scalar @$words_a > 0)
792 147 0 unless (&blessed($word) and $word->isa('Lingua::YaTeA::ForbiddenStructureMark'))
795 122 25 if (&blessed($word) and $word->isa('Lingua::YaTeA::TestifiedTermMark') or $word->isCompulsory($compulsory))
835 46 4 if ($FS->getLength <= scalar @$words_a)
838 0 46 if (defined $to_delete)
845 0 25 if (defined $to_delete)
849 0 0 if (&blessed($words_a->[0]) and $words_a->[0]->isa('Lingua::YaTeA::TestifiedTermMark')) { }
877 4 0 if ($FS->getLength <= scalar @$words_a)
880 4 0 if (defined $to_delete)
886 4 0 if (defined $to_delete)
890 0 4 if (&blessed($$words_a[$#$words_a]) and $$words_a[$#$words_a]->isa('Lingua::YaTeA::TestifiedTermMark')) { }
956 3 0 if ($this->getPath =~ m[/?([^/]+)\.[^\.]+$]) { }
993 1 2 if (-d $output_path)
1007 24 9 if ($option_set->optionExists($option))
1013 0 3 if ($no_output_defined == 1)
1029 9 15 unless (-d $sub_sub_dir)
1083 0 0 if ($occurrence->isNotBest(\@occurrences, $parsing_direction))
1102 0 0 if (scalar @$occurrences_set == 1) { }
1110 0 0 if ($occurrence->getID != $occ_id)
1158 0 0 unless ($word->isDocumentBoundary($document_boundary))
1161 0 0 if (exists $$occurrences_h{$word->getDocumentID}{$word->getSentenceID}{$word->getStartChar})
1170 0 0 if ($i == 0 || !$tag_set->existTag('COORDINATIONS', $this->getWords->[$i - 1]->getPOS) and $i == scalar @{$this->getWords;} - 1 || !$tag_set->existTag('COORDINATIONS', $this->getWords->[$i + $tc_length]->getPOS)) { }
1192 0 0 if (scalar $links_a > 0)
1210 0 0 if (defined $occurrence and $occurrence->getEndChar == $word->getStartChar + $word->getLexItem->getLength)
1219 0 0 if ($word->isSentenceBoundary($sentence_boundary))
1234 0 0 if ($sentence ne '')
1264 0 0 unless ($line =~ /^\s*$/ or $line =~ /^\s*#/)
1282 0 0 if ($file eq 'stdout') { }
1285 0 0 if ($file eq 'stderr') { }
1333 0 0 if ($word->isDocumentBoundary($document_boundary)) { }
1335 0 0 if ($in_doc == 1)
1337 0 0 unless ($last_word->isSentenceBoundary($sentence_boundary))
1347 0 0 if ($word->getDocument->getName ne 'no_name')
1359 0 0 if ($in_doc == 0)
1362 0 0 if ($word->getDocument->getName ne 'no_name')
1369 0 0 if ($word->isSentenceBoundary($sentence_boundary) or $word == $this->getWords->[$#{$this->getWords;}])
1379 0 0 if ($word == $this->getWords->[$#{$this->getWords;}])
1408 0 0 if ($word->isDocumentBoundary($document_boundary)) { }
1411 0 0 if ($word->getDocument->getName ne 'no_name')
1421 0 0 if ($word->isSentenceBoundary($sentence_boundary) or $word == $this->getWords->[$#{$this->getWords;}])
1438 0 0 unless (defined $offset)
1446 0 0 unless (substr $string, $offset - 1)
1469 0 0 if (exists $ids_for_parsed_h->{$occurrence_id}) { }
1471 0 0 if ($color_blind_option->getValue eq 'yes') { }
1473 0 0 if (defined $parsed_color) { }
1481 0 0 if (defined $parsed_color) { }
1490 0 0 if ($color_blind_option->getValue eq 'yes') { }
1492 0 0 if (defined $unparsed_color) { }
1500 0 0 if (defined $unparsed_color) { }
1529 0 0 if (&blessed($term) and $term->isa('Lingua::YaTeA::TestifiedTerm') or $occurrence->isMaximal)
1563 0 0 if ($occurrence->isMaximal)
1574 0 0 if ($occurrence->isMaximal)
1606 0 0 if ($term_list_style ne '' and $term_list_style ne 'all' and $term_list_style ne 'multi' || &blessed($tc) && $tc->isa('Lingua::YaTeA::MultiWordTermCandidate') != 1)
1638 2 0 if (scalar keys %$term_candidates_h > 0) { }