Skip to content

Instantly share code, notes, and snippets.

@kyanny
Created May 19, 2009 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyanny/114167 to your computer and use it in GitHub Desktop.
Save kyanny/114167 to your computer and use it in GitHub Desktop.
summarize_extract.pl Example of Lingua::JA::Summarize
#!/usr/bin/perl
use strict;
use warnings;
use Lingua::JA::Summarize::Extract;
use Perl6::Say;
use Getopt::Long;
use Pod::Usage;
my $help;
GetOptions(
'help' => ¥$help,
) or pod2usage(2);
$help and pod2usage(2);
my $text = do { local $/; <> };
my $summary = Lingua::JA::Summarize::Extract->extract($text);
say 'original';
say $text;
say 'summary';
say $summary;
__END__
=head1 NAME
summarize_extract.pl -
=head1 SYNOPSIS
$ curl http://blog.livedoor.jp/tabbata/archives/50684381.html | ./content_extract.pl | ./summarize_extract.pl
=head1 DESCRIPTION
=cut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment