# ***********************************************
# 
# !!!! DO NOT EDIT !!!!
# 
# This file was auto-generated by Build.PL.
# 
# ***********************************************
# 
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

=encoding utf8

=head1 NAME

Lucy::Analysis::Analyzer - Tokenize/modify/filter text.

=head1 SYNOPSIS

    # Abstract base class.

=head1 DESCRIPTION

An Analyzer is a filter which processes text, transforming it from one form
into another.  For instance, an analyzer might break up a long text into
smaller pieces (L<RegexTokenizer|Lucy::Analysis::RegexTokenizer>), or it
might perform case folding to facilitate case-insensitive search
(L<Normalizer|Lucy::Analysis::Normalizer>).

=head1 CONSTRUCTORS

=head2 new

    package MyAnalyzer;
    use base qw( Lucy::Analysis::Analyzer );
    our %foo;
    sub new {
        my $self = shift->SUPER::new;
        my %args = @_;
        $foo{$$self} = $args{foo};
        return $self;
    }

Abstract constructor.  Takes no arguments.

=head1 ABSTRACT METHODS

=head2 transform

    my $inversion = $analyzer->transform($inversion);

Take a single L<Inversion|Lucy::Analysis::Inversion> as input
and returns an Inversion, either the same one (presumably transformed
in some way), or a new one.

=over

=item *

B<inversion> - An inversion.

=back

=head1 METHODS

=head2 transform_text

    my $inversion = $analyzer->transform_text($text);

Kick off an analysis chain, creating an Inversion from string input.
The default implementation simply creates an initial Inversion with a
single Token, then calls L<transform()|/transform>, but occasionally subclasses will
provide an optimized implementation which minimizes string copies.

=over

=item *

B<text> - A string.

=back

=head2 split

    my $arrayref = $analyzer->split($text);

Analyze text and return an array of token texts.

=over

=item *

B<text> - A string.

=back

=head2 dump

    my $obj = $analyzer->dump();

Dump the analyzer as hash.

Subclasses should call L<dump()|/dump> on the superclass. The returned
object is a hash which should be populated with parameters of
the analyzer.

Returns: A hash containing a description of the analyzer.

=head2 load

    my $obj = $analyzer->load($dump);

Reconstruct an analyzer from a dump.

Subclasses should first call L<load()|/load> on the superclass. The
returned object is an analyzer which should be reconstructed by
setting the dumped parameters from the hash contained in C<dump>.

Note that the invocant analyzer is unused.

=over

=item *

B<dump> - A hash.

=back

Returns: An analyzer.

=head1 INHERITANCE

Lucy::Analysis::Analyzer isa Clownfish::Obj.

=cut

