File Coverage

blib/lib/Plucene/Analysis/Analyzer.pm
Criterion Covered Total %
statement 7 8 87.5
branch n/a
condition n/a
subroutine 3 4 75.0
pod 2 2 100.0
total 12 14 85.7


line stmt bran cond sub pod time code
1             package Plucene::Analysis::Analyzer;
2              
3             =head1 NAME
4              
5             Plucene::Analysis::Analyzer - base class for Analyzers
6              
7             =head1 SYNOPSIS
8              
9             my $analyzer = Plucene::Analysis::Analyzer::Subclass->new;
10              
11             =head1 DESCRIPTION
12              
13             This is an abstract base class of Analyzers.
14              
15             An Analyzer builds TokenStreams, which analyze text. It thus represents
16             a policy for extracting index terms from text.
17              
18             Typical implementations first build a Tokenizer, which breaks the stream
19             of characters from the Reader into raw Tokens. One or more TokenFilters
20             may then be applied to the output of the Tokenizer.
21              
22             =head1 METHODS
23              
24             =cut
25              
26 19     19   112 use strict;
  19         37  
  19         607  
27 19     19   97 use warnings;
  19         39  
  19         1240  
28              
29             =head2 new
30              
31             my $analyzer = Plucene::Analysis::Analyzer::Subclass->new;
32              
33             =cut
34              
35 197     197 1 4025 sub new { bless {}, shift }
36              
37             =head2 tokenstream
38              
39             This must be defined in a subclass
40              
41             =cut
42              
43 0     0 1   sub tokenstream { die "tokenstream must be defined in a subclass" }
44              
45             1;