Manual Reference Pages - LINGUA::ZH::SUMMARIZE (3)
Lingua::ZH::Summarize - Summarizing bodies of Chinese text
print summarize( $text ); # Easy, no? :-)
print summarize( $text, maxlength => 500 ); # 500-byte summary
print summarize( $text, wrap => 75 ); # Wrap output to 75 col.
This is a simple module which makes an unscientific effort at
summarizing Chinese text. It recognizes simple patterns which look like
statements, abridges them, and concatenates them into something vaguely
resembling a summary. It needs more work on large bodies of text, but
it seems to have a decent effect on small inputs at the moment.
Lingua::ZH::Summarize exports one function, summarize(), which takes
the text to summarize as its first argument, and any number of optional
directives in name => value form. The options itll take are:
Needless to say, this is a very simple and not terribly universally
effective scheme, but its good enough for a first draft, and Ill bang
on it more later. Like I said, its not a scientific approach to the
problem, but its better than nothing.
Specifies the maximum length, in bytes, of the generated summary.
Prettyprints the summary output by wrapping it to the number of columns
which you specify. This requires the Lingua::ZH::Wrap module.
Lingua::ZH::Toke, Lingua::ZH::Wrap, Lingua::EN::Summarize
Algorithm adapted from the Lingua::EN::Summarize module by
Dennis Taylor, <firstname.lastname@example.org>.
Autrijus Tang <email@example.com>
Copyright 2003 by Autrijus Tang <firstname.lastname@example.org>.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
|perl v5.20.3 ||SUMMARIZE (3) ||2003-01-20 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.