Actually Corion asked a few things, like identifying the book source, for example: http://gutenberg.net.au/plusfifty-a-m.html#mitchellm

And extracting 2 parts, like for example:

Scarlett turned away from Mammy with studied nonchalance, thankful tha +t her face had been unnoticed in Mammy's preoccupation with the matte +r of the shawl. "No, I want to sit here and watch the sunset. It's so pretty. You run +get my shawl. Please, Mammy, and I'll sit here till Pa comes home."

As you can see, Spoken text starts and ends with normal double quotes (where you can sometimes also have other quotation marks).

Now take your course material, and write up a simple loop around these 2 paragraphs (that you put into a text file).

Once you have a loop, post it here, and we can give some ideas on how to improve the loop. Good luck!

EDIT (addendum)

I will be honest here: Unless you find a source that is like a screen play (a says: "..." b says: "...") it will be extremely hard to identify WHO is saying something, as that has a few rules. Last person that does an action is the one that is talking, unless, the "quoted text" is followed by the word said. However, this next example falls totally outside that:

Mammy waddled back into the hall and Scarlett heard her call softly up + the stairwell to the upstairs maid.

Guess who is the next one to talk? Right, Mammy... So in order to have it right, you will need lexical analysis (for which there are perl modules, but I think too complex for beginners?)

screenplay... hint hint...


In reply to Re^3: Most frequent words in Gone with the Wind, help! by FreeBeerReekingMonk
in thread Most frequent words in Gone with the Wind, help! by margred

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.