Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Extracting the sentences from a webpage

by kyle (Abbot)
on Dec 07, 2009 at 22:31 UTC ( [id://811637]=note: print w/replies, xml ) Need Help??


in reply to Extracting the sentences from a webpage

I've never used Text::Sentence or Lingua::EN::Sentence, but they look like good places to start.

It looks as if you're trying to take a double space as the end of a sentence. Is that a special feature of your input text?

I'd do your @realSentences filtering with grep.

my @realSentence = grep { / / } @sentences;

In fact, from the split on down could be reduced to:

print "$_\n" for grep { / / } split /\./, $clean_text;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://811637]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2024-04-19 08:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found