StopWords/DA.pm

filter: Statementstmt 100% 29 / 29 Branchbran 100% 2 / 2 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 1 totaltotal 93.1% 41 / 44 CC 3 SCAR 5.1
CC
3
Cov
97%
getStopWords
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.7
« StopWords.pm ↑ Summary StopWords/DE.pm »
1 package Lingua::StopWords::DA;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use Encode qw(encode _utf8_on);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use Exporter;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 our @ISA = qw(Exporter);
12  
13 1 our %EXPORT_TAGS = ( 'all' => [ qw( getStopWords ) ] );
14 1 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
15 1 our $VERSION = 0.12;
16  
17 2 ▶sub getStopWords {
Subroutine getStopWords: called CC=3 SCAR=11.0
Pod undocumented
18 2 ▶ if ( @_ and $_[0] eq 'UTF-8' ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ and $_[0] eq 'UTF-8') { } 1 1 2
Condition66%2/3
@_ and $_[0] eq "UTF-8"
!ll&&!rl&&r
101
MC/DC50%1/2
@_ and $_[0] eq "UTF-8"
@_ $_[0] eq "UTF-8"
Truth table66%2/3
A and B
A= @_B= $_[0] eq "UTF-8"
ABresult
0X0
100
111
19 1 my %stoplist = map { ( $_, 1 ) } _stopwords();
20 1 return \%stoplist;
21 }
22 else {
23 1 my %stoplist = map { ( encode("iso-8859-1", $_), 1 ) } _stopwords();
24 1 return \%stoplist;
25 }
26 }
27  
28 2 ▶sub _stopwords {
Subroutine _stopwords: called CC=1 SCAR=0.0
29 2 return qw(
30 og i jeg det at en den til er som på de med han af for ikke der
31 var mig sig men et har om vi min havde ham hun nu over da fra
32 du ud sin dem os op man hans hvor eller hvad skal selv her alle
33 vil blev kunne ind når være dog noget ville jo deres efter ned
34 skulle denne end dette mit også under have dig anden hende mine
35 alt meget sit sine vor mod disse hvis din nogle hos blive mange
36 ad bliver hendes været thi jer sådan
37 );
38 }
39  
40 1 1;
« StopWords.pm ↑ Summary StopWords/DE.pm »