Changeset 1820
- Timestamp:
- 11/09/06 14:58:57
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plagger/lib/Plagger/Plugin/Summary/Japanese.pm
r1819 r1820 8 8 my($self, $context) = @_; 9 9 $context->autoload_plugin({ module => 'Filter::GuessLanguage' }); 10 $self->{extracter} = Lingua::JA::Summarize::Extract->new($self->conf); 10 11 $context->register_hook( 11 12 $self, … … 20 21 return unless $lang && $lang eq 'ja'; 21 22 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}; 24 25 return $summary->as_string; 25 26 } … … 50 51 =head1 SEE ALSO 51 52 52 L<Plagger> 53 L<Plagger>, L<Lingua::JA::Summarize::Extract> 53 54 54 55 =cut
