| 1 | ## -*- Mode: CPerl -*- | ||
| 2 | ## | ||
| 3 | ## File: DTA::CAB::Analyzer::Koeln.pm | ||
| 4 | ## Author: Bryan Jurish <moocow@cpan.org> | ||
| 5 | ## Description: phonetic digest analysis using Text::Phonetic::Koeln | ||
| 6 | |||
| 7 | package DTA::CAB::Analyzer::Koeln; | ||
| 8 | use DTA::CAB::Analyzer::TextPhonetic; | ||
| 9 | use Carp; | ||
| 10 | use strict; | ||
| 11 | our @ISA = qw(DTA::CAB::Analyzer::TextPhonetic); | ||
| 12 | |||
| 13 | ## $obj = CLASS_OR_OBJ->new(%args) | ||
| 14 | ## + object structure, %args | ||
| 15 | ## alg => $alg, ##-- Text::Phonetic subclass, e.g. 'Soundex','Koeln','Metaphone' (default='Koeln') | ||
| 16 | ## tpo => $obj, ##-- underlying Text::Phonetic::Whatever object | ||
| 17 | ## analyzeGet => $codestr, ##-- accessor: coderef or string: source text (default=$DEFAULT_ANALYZE_GET) | ||
| 18 | sub new { | ||
| 19 | my $that = shift; | ||
| 20 | my $tp = $that->SUPER::new( | ||
| 21 | ##-- defaults | ||
| 22 | alg => 'Koeln', | ||
| 23 | |||
| 24 | ##-- analysis selection | ||
| 25 | label => 'koeln', | ||
| 26 | |||
| 27 | ##-- user args | ||
| 28 | @_ | ||
| 29 | ); | ||
| 30 | return $tp; | ||
| 31 | } | ||
| 32 | |||
| 33 | 1; ##-- be happy | ||
| 34 | |||
| 35 | __END__ |