Plucene/Analysis/Standard/StandardAnalyzer.pm

filter: Statementstmt 89.4% 17 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 1 / 1 totaltotal 88.4% 23 / 26 CC 1 SCAR 1.5
CC
1
Cov
89%
tokenstream
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Plucene/Index/TermInfo.pm ↑ Summary Plucene/Document/Field.pm »
1 package Plucene::Analysis::Standard::StandardAnalyzer;
2  
3 =head1 NAME
4  
5 Plucene::Analysis::Standard::StandardAnalyzer - standard analyzer
6  
7 =head1 SYNOPSIS
8  
9 my Plucene::Analysis::Stopfilter $sf =
10 Plucene::Analysis::Standard::StandardAnalyzer->tokenstream(@args);
11
12 =head1 DESCRIPTION
13  
14 The standard analyzer, built with a list of stop words.
15  
16 This list of stop words are:
17  
18 "a", "and", "are", "as", "at", "be", "but", "by",
19 "for", "if", "in", "into", "is", "it", "no", "not",
20 "of", "on", "or", "s", "such", "t", "that", "the",
21 "their", "then", "there", "these", "they", "this", "to", "was",
22 "will", "with"
23
24 =head1 METHODS
25  
26 =cut
27  
28 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
29 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
30  
31 1 ▶use base 'Plucene::Analysis::Analyzer';
Subroutine BEGIN: called CC=1 SCAR=0.0
32  
33 1 ▶use Plucene::Analysis::Standard::StandardTokenizer;
Subroutine BEGIN: called CC=1 SCAR=0.0
34 1 ▶use Plucene::Analysis::StopFilter;
Subroutine BEGIN: called CC=1 SCAR=0.0
35  
36 1 my @stopwords = (
37 "a", "and", "are", "as", "at", "be", "but", "by",
38 "for", "if", "in", "into", "is", "it", "no", "not",
39 "of", "on", "or", "s", "such", "t", "that", "the",
40 "their", "then", "there", "these", "they", "this", "to", "was",
41 "will", "with"
42 );
43  
44 =head2 tokenstream
45  
46 my Plucene::Analysis::Stopfilter $sf =
47 Plucene::Analysis::Standard::StandardAnalyzer->tokenstream(@args);
48  
49 =cut
50  
51 0 ▶sub tokenstream {
Subroutine tokenstream: not called CC=1 SCAR=6.9
Pod documented
52 0 my $class = shift;
53 0 return Plucene::Analysis::StopFilter->new({
54 input => Plucene::Analysis::Standard::StandardTokenizer->new(@_),
55 stoplist => \@stopwords
56 });
57 }
58  
59 1 1;
« Plucene/Index/TermInfo.pm ↑ Summary Plucene/Document/Field.pm »