.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "KinoSearch1::Analysis::PolyAnalyzer 3pm" .TH KinoSearch1::Analysis::PolyAnalyzer 3pm 2024-03-10 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME KinoSearch1::Analysis::PolyAnalyzer \- multiple analyzers in series .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 3 \& my $analyzer = KinoSearch1::Analysis::PolyAnalyzer\->new( \& language => \*(Aqes\*(Aq, \& ); \& \& # or... \& my $analyzer = KinoSearch1::Analysis::PolyAnalyzer\->new( \& analyzers => [ \& $lc_normalizer, \& $custom_tokenizer, \& $snowball_stemmer, \& ], \& ); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" A PolyAnalyzer is a series of Analyzers \-\- objects which inherit from KinoSearch1::Analysis::Analyzer \-\- each of which will be called upon to "analyze" text in turn. You can either provide the Analyzers yourself, or you can specify a supported language, in which case a PolyAnalyzer consisting of an LCNormalizer, a Tokenizer, and a Stemmer will be generated for you. .PP Supported languages: .PP .Vb 12 \& en => English, \& da => Danish, \& de => German, \& es => Spanish, \& fi => Finnish, \& fr => French, \& it => Italian, \& nl => Dutch, \& no => Norwegian, \& pt => Portuguese, \& ru => Russian, \& sv => Swedish, .Ve .SH CONSTRUCTOR .IX Header "CONSTRUCTOR" .SS \fBnew()\fP .IX Subsection "new()" .Vb 3 \& my $analyzer = KinoSearch1::Analysis::PolyAnalyzer\->new( \& language => \*(Aqen\*(Aq, \& ); .Ve .PP Construct a PolyAnalyzer object. If the parameter \f(CW\*(C`analyzers\*(C'\fR is specified, it will override \f(CW\*(C`language\*(C'\fR and no attempt will be made to generate a default set of Analyzers. .IP \(bu 4 \&\fBlanguage\fR \- Must be an ISO code from the list of supported languages. .IP \(bu 4 \&\fBanalyzers\fR \- Must be an arrayref. Each element in the array must inherit from KinoSearch1::Analysis::Analyzer. The order of the analyzers matters. Don't put a Stemmer before a Tokenizer (can't stem whole documents or paragraphs \-\- just individual words), or a Stopalizer after a Stemmer (stemmed words, e.g. "themselv", will not appear in a stoplist). In general, the sequence should be: normalize, tokenize, stopalize, stem. .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright 2005\-2010 Marvin Humphrey .SH "LICENSE, DISCLAIMER, BUGS, etc." .IX Header "LICENSE, DISCLAIMER, BUGS, etc." See KinoSearch1 version 1.01.