StopWords/EN.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/DE.pm ↑ Summary StopWords/ES.pm »
1 package Lingua::StopWords::EN;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use Encode qw(encode);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 ▶use Exporter;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 2 our @ISA = qw(Exporter);
12  
13 2 our %EXPORT_TAGS = ( 'all' => [ qw( getStopWords ) ] );
14 2 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
15 2 our $VERSION = 0.12;
16  
17 3 ▶sub getStopWords {
Subroutine getStopWords: called CC=3 SCAR=11.0
Pod undocumented
18 3 ▶ if ( @_ and $_[0] eq 'UTF-8' ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ and $_[0] eq 'UTF-8') { } 1 2 3
Condition66%2/3
@_ and $_[0] eq "UTF-8"
!ll&&!rl&&r
201
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 2 my %stoplist = map { ( encode("iso-8859-1", $_), 1 ) } _stopwords();
24 2 return \%stoplist;
25 }
26 }
27  
28 3 ▶sub _stopwords {
Subroutine _stopwords: called CC=1 SCAR=0.0
29 3 return qw(
30 i me my myself we our ours ourselves you your yours yourself
31 yourselves he him his himself she her hers herself it its
32 itself they them their theirs themselves what which who whom
33 this that these those am is are was were be been being have has
34 had having do does did doing would should could ought i'm
35 you're he's she's it's we're they're i've you've we've they've
36 i'd you'd he'd she'd we'd they'd i'll you'll he'll she'll we'll
37 they'll isn't aren't wasn't weren't hasn't haven't hadn't
38 doesn't don't didn't won't wouldn't shan't shouldn't can't
39 cannot couldn't mustn't let's that's who's what's here's
40 there's when's where's why's how's a an the and but if or
41 because as until while of at by for with about against between
42 into through during before after above below to from up down in
43 out on off over under again further then once here there when
44 where why how all any both each few more most other some such
45 no nor not only own same so than too very
46 );
47 }
48  
49 2 1;
« StopWords/DE.pm ↑ Summary StopWords/ES.pm »