line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::StopWords; |
2
|
2
|
|
|
2
|
|
155903
|
use strict; |
|
2
|
|
|
|
|
13
|
|
|
2
|
|
|
|
|
60
|
|
3
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
342
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
require Exporter; |
6
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
7
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( 'all' => [ qw( getStopWords ) ] ); |
8
|
|
|
|
|
|
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
9
|
|
|
|
|
|
|
our $VERSION = 0.12; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub getStopWords { |
12
|
33
|
|
|
33
|
1
|
21799
|
my ( $language, $encoding ) = @_; |
13
|
|
|
|
|
|
|
|
14
|
33
|
50
|
|
|
|
94
|
return undef unless $language; |
15
|
|
|
|
|
|
|
|
16
|
33
|
|
|
|
|
78
|
$language = uc($language); |
17
|
33
|
|
|
|
|
55
|
eval { require "Lingua/StopWords/$language.pm"; }; |
|
33
|
|
|
|
|
8168
|
|
18
|
33
|
100
|
|
|
|
115
|
return undef if $@; |
19
|
|
|
|
|
|
|
|
20
|
32
|
100
|
|
|
|
99
|
my @args = $encoding ? ($encoding) : (); |
21
|
2
|
|
|
2
|
|
16
|
no strict 'refs'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
181
|
|
22
|
32
|
|
|
|
|
47
|
return &{ "Lingua::StopWords::$language\::getStopWords" }(@args); |
|
32
|
|
|
|
|
193
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |