in reply to Retreaving N first sentences from text.

Lingua::EN::Sentence has lots of re's:

use Lingua::EN::Sentence qw( get_sentences ); sub nsentences { my ($num, @text) = @_; my $sentences = get_sentences(join " ",@text); join " ", @{$sentences}[0..$num-1]; }

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: Retreaving N first sentences from text.
by c0d34w4y (Acolyte) on Dec 15, 2001 at 04:20 UTC
    I knew my code was far from being perfect ;-)
    Thankx for great suggestions... I'm going to
    change my code a bit now. I think the Lingua::EN::Sentence module
    might be of some use.
    


    --
    print join(" ", map { sprintf "%#02x", $_ }unpack("C*",pack("L",0x1234 +5678)))