Changeset 1820

Show
Ignore:
Timestamp:
11/09/06 14:58:57
Author:
ko
Message:

configuration support for Summart::Japanese

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Summary/Japanese.pm

    r1819 r1820  
    88    my($self, $context) = @_; 
    99    $context->autoload_plugin({ module => 'Filter::GuessLanguage' }); 
     10    $self->{extracter} = Lingua::JA::Summarize::Extract->new($self->conf); 
    1011    $context->register_hook( 
    1112        $self, 
     
    2021    return unless $lang && $lang eq 'ja'; 
    2122 
    22     my $summary = Lingua::JA::Summarize::Extract->extract($args->{entry}->body->plaintext); 
    23     $summary->length(128)
     23    my $summary = $self->{extracter}->extract($args->{entry}->body->plaintext); 
     24    $summary->length(128) unless $self->conf->{length}
    2425    return $summary->as_string; 
    2526} 
     
    5051=head1 SEE ALSO 
    5152 
    52 L<Plagger> 
     53L<Plagger>, L<Lingua::JA::Summarize::Extract> 
    5354 
    5455=cut