StopWords/NL.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/IT.pm ↑ Summary StopWords/NO.pm »
1 package Lingua::StopWords::NL;
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);
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 de en van ik te dat die in een hij het niet zijn is was op aan
31 met als voor had er maar om hem dan zou of wat mijn men dit zo
32 door over ze zich bij ook tot je mij uit der daar haar naar heb
33 hoe heeft hebben deze u want nog zal me zij nu ge geen omdat
34 iets worden toch al waren veel meer doen toen moet ben zonder
35 kan hun dus alles onder ja eens hier wie werd altijd doch wordt
36 wezen kunnen ons zelf tegen na reeds wil kon niets uw iemand
37 geweest andere
38 );
39 }
40  
41 1 1;
« StopWords/IT.pm ↑ Summary StopWords/NO.pm »