Branch Coverage

blib/lib/Alvis/TermTagger.pm
Criterion Covered Total %
branch 37 64 57.8


line true false branch
43 1 3 unless (defined $caseSensitive)
51 3 1 if (defined $lemmatised_corpus_filename)
55 3 1 if (defined $lemmatised_corpus_filename)
59 3 1 if (defined $lemmatised_corpus_filename)
63 3 1 if (defined $lemmatised_corpus_filename)
81 0 4 unless open DESC_TERMLIST, $termlist_name
91 20 0 unless ($line =~ /^\s*\#/o or $line =~ m[^\s*//]o or $line =~ /^\s*$/o)
94 20 0 unless ($tab[0] =~ /^\s*$/)
100 20 0 if (not exists $$ref_termlistIdx{$tab[0]}) { }
122 20 0 if (defined $ref_regex_lemmaWordtermlist)
123 0 20 if (defined $$ref_termlist[$term_counter][3]) { }
132 20 0 if (defined $ref_regex_lemmaWordtermlist)
138 4 0 if (defined $ref_regex_lemmaWordtermlist)
152 0 7 unless open CORPUS, $corpus_filename
183 226 285 if (defined $caseSensitive and $caseSensitive == 0 || length $tab_words_lc[$i] <= $caseSensitive) { }
188 455 56 if ($word ne '')
189 339 116 unless (exists $$ref_corpus_index{$word})
234 0 0 if ($word ne '' and length $word > 2 || scalar @tab_termlex == 1 and exists $$ref_corpus_index{$word})
237 0 0 unless (exists $$ref_tabh_idtrm_select{$counter})
272 10 25 if (defined $caseSensitive and $caseSensitive == 0 || length $$ref_termlist[$counter][0] <= $caseSensitive) { }
298 61 0 if ($word ne '')
308 34 1 if ($i == scalar @tab_termlex)
310 34 27 unless (exists $$ref_tabh_idtrm_select{$counter})
339 0 7 unless open TAGGEDCORPUS, ">>$offset_tagged_corpus_name"
349 37 21 if (defined $caseSensitive and $caseSensitive == 0 || length $$ref_termlist[$counter][0] <= $caseSensitive and $line =~ m<[,.?!:;/ \n\-/\*'\#\{\}\(\)\[\]\+]($term_regex)[,.?!:;/ \n\-/\*'\#\(\)\[\]\{\}\+]> or !defined($caseSensitive) || $caseSensitive < 0 || length $$ref_termlist[$counter][0] > $caseSensitive and $line =~ m<[,.?!:;/ \n\-/\*'\#\{\}\(\)\[\]\+]($term_regex)[,.?!:;/ \n\-/\*'\#\(\)\[\]\{\}\+]>i)
355 0 58 if (defined $caseSensitive and $caseSensitive == 0 || length $$ref_termlist[$counter][0] <= $caseSensitive and $line =~ m<^($term_regex)[,.?!:;/ \n\-/\*'\#\(\)\[\]\{\}\+]>i or !defined($caseSensitive) || $caseSensitive < 0 || length $$ref_termlist[$counter][0] > $caseSensitive and $line =~ m<^($term_regex)[,.?!:;/ \n\-/\*'\#\(\)\[\]\{\}\+]>i)
361 0 58 if (defined $caseSensitive and $caseSensitive == 0 || length $$ref_termlist[$counter][0] <= $caseSensitive and $line =~ m<[,.?!:;/ \n\-/\*'\#\(\)\[\]\{\}\+]($term_regex)$> or !defined($caseSensitive) || $caseSensitive < 0 || length $$ref_termlist[$counter][0] > $caseSensitive and $line =~ m<[,.?!:;/ \n\-/\*'\#\(\)\[\]\{\}\+]($term_regex)$>i)
411 0 0 if (defined $caseSensitive and $caseSensitive == 0 || length $$ref_termlist[$counter][0] <= $caseSensitive and $line =~ m<[,.?!:;/ \n\-/\*'\#\{\}\(\)\[\]\+](?$term_regex)[,.?!:;/ \n\-/\*'\#\(\)\[\]\{\}\+]>s or !defined($caseSensitive) || $caseSensitive < 0 || length $$ref_termlist[$counter][0] > $caseSensitive and $line =~ m<[,.?!:;/ \n\-/\*'\#\{\}\(\)\[\]\+](?$term_regex)[,.?!:;/ \n\-/\*'\#\(\)\[\]\{\}\+]>is)
417 0 0 if (defined $caseSensitive and $caseSensitive == 0 || length $$ref_termlist[$counter][0] <= $caseSensitive and $line =~ m<^(?$term_regex)[,.?!:;/ \n\-/\*'\#\(\)\[\]\{\}\+]>s or !defined($caseSensitive) || $caseSensitive < 0 || length $$ref_termlist[$counter][0] > $caseSensitive and $line =~ m<^(?$term_regex)[,.?!:;/ \n\-/\*'\#\(\)\[\]\{\}\+]>is)
423 0 0 if (defined $caseSensitive and $caseSensitive == 0 || length $$ref_termlist[$counter][0] <= $caseSensitive and $line =~ m<[,.?!:;/ \n\-/\*'\#\(\)\[\]\{\}\+](?$term_regex)$>s or !defined($caseSensitive) || $caseSensitive < 0 || length $$ref_termlist[$counter][0] > $caseSensitive and $line =~ m<[,.?!:;/ \n\-/\*'\#\(\)\[\]\{\}\+](?$term_regex)$>is)
446 0 0 if (ref $ref_tab_results eq 'ARRAY') { }
451 0 0 if (ref $ref_tab_results eq 'HASH')