Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I am a novice in perl. I am trying to split a data into a summary based on the number of words(or sentences or letter).
$data = "How do you take paragraph or large amount of text and break i +t into sentences (perferably using Ruby) taking into account cases su +ch as Mr. and Dr. and U.S.A? (Assuming you just put the sentences int +o an array of arrays) UPDATE: One possible solution I thought of involves using a parts-of-s +peech tagger (POST) and a classifier to determine the end of a senten +ce: Getting data from Mr. Jones felt the warm sun on his face as he steppe +d out onto the balcony of his summer home in Italy. He was happy to b +e alive.";
I want to show the summary in another variable $data_summary, so,
$data_summary = "How do you take paragraph or large amount of text and break it into sentences (perferably using Ruby) taking into account cases such as Mr. and Dr. and U.S.A? (Assuming you just put the sentences into..."
Can anyone help me in getting the $data_summary as above by splitting based on number of words, sentences or letters (I prefer based on number of letters).
Thank you in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Split a paragraph based on the number of letters
by 2teez (Vicar) on Feb 04, 2014 at 14:02 UTC | |
|
Re: Split a paragraph based on the number of letters
by kennethk (Abbot) on Feb 04, 2014 at 15:19 UTC | |
by Not_a_Number (Prior) on Feb 04, 2014 at 18:55 UTC | |
by kennethk (Abbot) on Feb 04, 2014 at 19:15 UTC |