Difference: Lab10 (1 vs. 34)

Revision 342018-05-01 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project - Shakespeare

Line: 60 to 60
 
  1. (1%) Add support for a second author or set of works. The second file must be at least 1Mb, and you will need to format it appropriately.*
  2. (2%) Add support for 5 or more additional books, and start with a menu listing the options, and allowing the user to select the works, then on to the other operations.*
  3. (1%) Add support more two or more adjacent words, such as "Lady MacBeth " or "to be or not to be".
Changed:
<
<
  1. (2%) Add support to search for two or more words, not necessarily adjacent, in the same line. For example, find paragraphs that incude the words "King", "Rosencrantz", and "Guildenstern".
>
>
  1. (2%) Add support to search for two or more words, not necessarily adjacent, in the same line. For example, find paragraphs that include the words "King", "Rosencrantz", and "Guildenstern".
 
  1. (1%) Add support to search for words within some specified numbers of word apart. E.g. search for lines with "King" and "Rosencrantz" with less then 3 words between (either order).
  2. (2%) Add Stemming (see instructor if you wish to try this)
Changed:
<
<
  1. You propose your own!!

>
>
  1. You propose your own!!

  * You make get additional books here.

The Book Class definition

Line: 84 to 84
  void setTitle(string aTitle); // Set the title of this book string getTitle(); // Get the title int countMatches(string word); // Return the number of time word appears in a Book
Added:
>
>
int size(); // Number of lines in book;
  void addLine(string line); // add a line to the book; void clear(); // Clear the contents and title of book void startSearch(string word); // Start a search for getNextMatch
Line: 233 to 234
  Prince. This oily rascal is known as well as Paul's. Go call him whoreson, impudent, emboss'd rascal, if there were anything in
Changed:
<
<
To display the paragraphs containing rascal enter the number of the book, or 0 to search for another word: 30
>
>
To display the lines containing rascal enter the number of the book, or 0 to search for another word: 30
  I bade the rascal knock upon your gate, While she did call me rascal fiddler And bring along these rascal knaves with thee? What dogs are these? Where is the rascal cook?
Changed:
<
<
To display the paragraphs containing rascal enter the number of the book, or 0 to search for another word: 29
>
>
To display the lines containing rascal enter the number of the book, or 0 to search for another word: 29
 
Changed:
<
<
To display the paragraphs containing rascal enter the number of the book, or 0 to search for another word: 0
>
>
To display the lines containing rascal enter the number of the book, or 0 to search for another word: 0
 Enter a word to search for (* to end):brain 1. THE SONNETS Matches: 5 2. ALLS WELL THAT ENDS WELL Matches: 0
Line: 281 to 282
 36. THE TWO GENTLEMEN OF VERONA Matches: 0 37. THE WINTER'S TALE Matches: 2 38. A LOVER'S COMPLAINT Matches: 0
Changed:
<
<
To display the paragraphs containing brain enter the number of the book, or 0 to search for another word: 19
>
>
To display the lines containing brain enter the number of the book, or 0 to search for another word: 19
  That hath a mint of phrases in his brain; Other slow arts entirely keep the brain; Lives not alone immured in the brain, To weed this wormwood from your fruitful brain,
Changed:
<
<
To display the paragraphs containing brain enter the number of the book, or 0 to search for another word: 2
>
>
To display the lines containing brain enter the number of the book, or 0 to search for another word: 2
 
Changed:
<
<
To display the paragraphs containing brain enter the number of the book, or 0 to search for another word: 8
>
>
To display the lines containing brain enter the number of the book, or 0 to search for another word: 8
  Without more motive, into every brain Within the book and volume of my brain, And I do think- or else this brain of mine
Line: 297 to 298
  Queen. Sleep rock thy brain, Queen. This is the very coinage of your brain.
Changed:
<
<
To display the paragraphs containing brain enter the number of the book, or 0 to search for another word: 0
>
>
To display the lines containing brain enter the number of the book, or 0 to search for another word: 0
 Enter a word to search for (* to end):*

Revision 332018-04-26 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project - Shakespeare

Changed:
<
<

Due: Dec 7, 11:55pm

>
>

Due: May 3, 4:00pm

 
(No late submissions allowed)
Changed:
<
<
Moodle Link
BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg
>
>
Moodle Link
BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg
 

Instructions

  • Turn in the code (a cpp file), and the run outputs as requested below.
Line: 63 to 63
 
  1. (2%) Add support to search for two or more words, not necessarily adjacent, in the same line. For example, find paragraphs that incude the words "King", "Rosencrantz", and "Guildenstern".
  2. (1%) Add support to search for words within some specified numbers of word apart. E.g. search for lines with "King" and "Rosencrantz" with less then 3 words between (either order).
  3. (2%) Add Stemming (see instructor if you wish to try this)
Changed:
<
<
  1. You propose your own!!

>
>
  1. You propose your own!!

  * You make get additional books here.

The Book Class definition

Revision 322017-12-07 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project - Shakespeare

Line: 32 to 32
 Your program must do at least the following:

  1. Read in the entire file of Shakespeare books, and parse it into Books, where Books is object the contains an entire book (definition below). Thus there will be an array of Books, and each Book will include a title plus an array of Lines.
Changed:
<
<
  1. Display a list of the book titles, along with the number of paragraphs found in each book.
>
>
  1. Display a list of the book titles.
 
  1. Ask the user for a word to search for, and then display a numbered list of the books that contain that word, along with the number of Lines in that book that contain that word. Make searches case insensitive (so searching for "king" matches "king", "King", and "KING", for example. Also remove special character from the search (you may use the code below developed in the Poem program (See program run example below)
Changed:
<
<
  1. If the user enters in a number, show each matching paragraph from that book.
>
>
  1. If the user enters in a number, show each matching line from that book.
 
  1. Repeat steps 2, 3 and 4 until the user is done.
Changed:
<
<
A paragraph, for the purposes of this project, is defined as a series of lines in a book what are contiguous. So a paragraph boundary is one (or more) blank line between other lines of code. This is the closest appoximation we can make to determine paragraphs. Some of the paragraphs will be quite big. There should never be an empty paragraph.

What to turn in

>
>

What to turn in

  For the basic program turn in the following:
  1. All the code, fully documented
Line: 61 to 60
 
  1. (1%) Add support for a second author or set of works. The second file must be at least 1Mb, and you will need to format it appropriately.*
  2. (2%) Add support for 5 or more additional books, and start with a menu listing the options, and allowing the user to select the works, then on to the other operations.*
  3. (1%) Add support more two or more adjacent words, such as "Lady MacBeth " or "to be or not to be".
Changed:
<
<
  1. (2%) Add support to search for two or more words, not necessarily adjacent, in the same paragraph. For example, find paragraphs that incude the words "King", "Rosencrantz", and "Guildenstern".
  2. (1%) Add support to search for words within some specified numbers of word apart. E.g. search for paragraphs with "King" and "Rosencrantz" with less then 3 words between (either order).
>
>
  1. (2%) Add support to search for two or more words, not necessarily adjacent, in the same line. For example, find paragraphs that incude the words "King", "Rosencrantz", and "Guildenstern".
  2. (1%) Add support to search for words within some specified numbers of word apart. E.g. search for lines with "King" and "Rosencrantz" with less then 3 words between (either order).
 
  1. (2%) Add Stemming (see instructor if you wish to try this)
Changed:
<
<
  1. You propose your own!!

>
>
  1. You propose your own!!

  * You make get additional books here.

The Book Class definition

Line: 223 to 222
 36. THE TWO GENTLEMEN OF VERONA Matches: 0 37. THE WINTER'S TALE Matches: 1 38. A LOVER'S COMPLAINT Matches: 0
Changed:
<
<
To display the paragraphs containing rascal enter the number of the book, or 0 to search for another word: 9
>
>
To display the lines containing rascal enter the number of the book, or 0 to search for another word: 9
  Prince. I comes forward I Peace, ye fat-kidney'd rascal! What a Fal. I am accurs'd to rob in that thief's company. The rascal hath with the rogue's company. If the rascal have not given me
Line: 303 to 302
 
Changed:
<
<
Solution 
>
>
Solution
 
META FILEATTACHMENT attachment="Shakespeare.txt" attr="" comment="" date="1479329239" name="Shakespeare.txt" path="Shakespeare.txt" size="5465289" user="JimSkon" version="1"
META FILEATTACHMENT attachment="C_-_shakespeare.png" attr="" comment="" date="1478583816" name="C_-_shakespeare.png" path="C_-_shakespeare.png" size="19227" user="JimSkon" version="1"

Revision 312017-12-07 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project - Shakespeare

Line: 64 to 64
 
  1. (2%) Add support to search for two or more words, not necessarily adjacent, in the same paragraph. For example, find paragraphs that incude the words "King", "Rosencrantz", and "Guildenstern".
  2. (1%) Add support to search for words within some specified numbers of word apart. E.g. search for paragraphs with "King" and "Rosencrantz" with less then 3 words between (either order).
  3. (2%) Add Stemming (see instructor if you wish to try this)
Changed:
<
<
  1. You propose your own!!

>
>
  1. You propose your own!!

  * You make get additional books here.

The Book Class definition

Line: 303 to 303
 
Changed:
<
<
>
>
Solution 
 
META FILEATTACHMENT attachment="Shakespeare.txt" attr="" comment="" date="1479329239" name="Shakespeare.txt" path="Shakespeare.txt" size="5465289" user="JimSkon" version="1"
META FILEATTACHMENT attachment="C_-_shakespeare.png" attr="" comment="" date="1478583816" name="C_-_shakespeare.png" path="C_-_shakespeare.png" size="19227" user="JimSkon" version="1"

Revision 302017-12-05 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project - Shakespeare

Changed:
<
<

Due: May 5, 11:55pm

>
>

Due: Dec 7, 11:55pm

 
(No late submissions allowed)
Changed:
<
<
Moodle Link
BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg
>
>
Moodle Link
BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg
 

Instructions

  • Turn in the code (a cpp file), and the run outputs as requested below.
Line: 64 to 64
 
  1. (2%) Add support to search for two or more words, not necessarily adjacent, in the same paragraph. For example, find paragraphs that incude the words "King", "Rosencrantz", and "Guildenstern".
  2. (1%) Add support to search for words within some specified numbers of word apart. E.g. search for paragraphs with "King" and "Rosencrantz" with less then 3 words between (either order).
  3. (2%) Add Stemming (see instructor if you wish to try this)
Changed:
<
<
  1. You propose your own!!
>
>
  1. You propose your own!!

 * You make get additional books here.

The Book Class definition

Revision 292017-11-29 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project - Shakespeare

Line: 307 to 307
 
META FILEATTACHMENT attachment="Shakespeare.txt" attr="" comment="" date="1479329239" name="Shakespeare.txt" path="Shakespeare.txt" size="5465289" user="JimSkon" version="1"
META FILEATTACHMENT attachment="C_-_shakespeare.png" attr="" comment="" date="1478583816" name="C_-_shakespeare.png" path="C_-_shakespeare.png" size="19227" user="JimSkon" version="1"
META FILEATTACHMENT attachment="BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg" attr="" comment="" date="1475358444" name="BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg" path="BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg" size="73395" user="JimSkon" version="1"
Changed:
<
<
META FILEATTACHMENT attachment="ShakespeareRead.png" attr="" comment="" date="1511847282" name="ShakespeareRead.png" path="ShakespeareRead.png" size="25679" user="JimSkon" version="1"
>
>
META FILEATTACHMENT attachment="ShakespeareRead.png" attr="" comment="" date="1511969460" name="ShakespeareRead.png" path="ShakespeareRead.png" size="25899" user="JimSkon" version="2"

Revision 282017-11-28 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project - Shakespeare

Line: 58 to 58
  Some options:

  1. (1%) Highlight the matching words (bold or color).
Changed:
<
<
  1. (1%) Add support for a second author or set of works. The second file must be at least 1Mb, and you will need to format it appropriately.
  2. (2%) Add support for 5 or more authors, and start with a menu listing the options, and allowing the user to select the works, then on to the other operations.
>
>
  1. (1%) Add support for a second author or set of works. The second file must be at least 1Mb, and you will need to format it appropriately.*
  2. (2%) Add support for 5 or more additional books, and start with a menu listing the options, and allowing the user to select the works, then on to the other operations.*
 
  1. (1%) Add support more two or more adjacent words, such as "Lady MacBeth " or "to be or not to be".
  2. (2%) Add support to search for two or more words, not necessarily adjacent, in the same paragraph. For example, find paragraphs that incude the words "King", "Rosencrantz", and "Guildenstern".
  3. (1%) Add support to search for words within some specified numbers of word apart. E.g. search for paragraphs with "King" and "Rosencrantz" with less then 3 words between (either order).
  4. (2%) Add Stemming (see instructor if you wish to try this)
  5. You propose your own!!
Added:
>
>
* You make get additional books here.
 

The Book Class definition

%CODE{"c++"}%

Revision 272017-11-28 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project - Shakespeare

Line: 31 to 31
  Your program must do at least the following:
Changed:
<
<
  1. Read in the entire file of Shakespeare books, and parse it into Books and Paragraphs, where Books is object the contains an entire book (definition below), and Paragraph is an object representation of a paragraph (also below). Thus there will be an array of Books, and each Book will include a title plus an array of Paragraphs.
>
>
  1. Read in the entire file of Shakespeare books, and parse it into Books, where Books is object the contains an entire book (definition below). Thus there will be an array of Books, and each Book will include a title plus an array of Lines.
 
  1. Display a list of the book titles, along with the number of paragraphs found in each book.
Changed:
<
<
  1. Ask the user for a word to search for, and then display a numbered list of the books that contain that word, along with the number of Paragraphs in that book that contain that word. (See program run example below)
>
>
  1. Ask the user for a word to search for, and then display a numbered list of the books that contain that word, along with the number of Lines in that book that contain that word. Make searches case insensitive (so searching for "king" matches "king", "King", and "KING", for example. Also remove special character from the search (you may use the code below developed in the Poem program (See program run example below)
 
  1. If the user enters in a number, show each matching paragraph from that book.
  2. Repeat steps 2, 3 and 4until the user is done.
A paragraph, for the purposes of this project, is defined as a series of lines in a book what are contiguous. So a paragraph boundary is one (or more) blank line between other lines of code. This is the closest appoximation we can make to determine paragraphs. Some of the paragraphs will be quite big. There should never be an empty paragraph.
Line: 41 to 41
  For the basic program turn in the following:
  1. All the code, fully documented
Changed:
<
<
  1. The output of runs with the following searches: Kenyon (should fail), doctor, king, ship, love.
>
>
  1. The output of runs with the following searches: Kenyon (should fail), college, king, ship, love.
 
  1. Complete documentaiton for any extra credit work, as described below.

Extra Credit

Line: 49 to 49
  For the extra credit you must turn in all of the following:
  1. A word or text document clearing describing, in a numbered list, all of the extra credit functions you have added.
Changed:
<
<
  1. A table describing each the extra credit features added, and the expected extra credit for it. For example
    Feature Credit
    1. Option to view the actual paragraphs that match. 1%
    4. Made Word search case insensitive. 1%
    3. Highlight the matching words in Red 1%
    Total 3%
>
>
  1. A table describing each the extra credit features added, and the expected extra credit for it. For example
    Feature Credit
    1. Highlight the matching words. 1%
    4. Add support more two or more adjacent words, such as "Lady MacBeth " or "to be or not to be". 1%
    Total 2%
 
  1. At least one run for each feature clearly demonstrating it's operation.

Extra credit Options

Line: 57 to 57
  Some options:
Changed:
<
<
  1. (1%) Highlight the matching words (bold or color) in the above option.
  2. (1%) Make searches case insensitive (so searching for "king" matches "king", "King", and "KING", for example.
  3. (1%) Add an option to show the matching paragraphs from a selected book (shown in the example below).
  4. (1%) Choose whether to see whole matching paragraph or just the matching sentences.
>
>
  1. (1%) Highlight the matching words (bold or color).
 
  1. (1%) Add support for a second author or set of works. The second file must be at least 1Mb, and you will need to format it appropriately.
  2. (2%) Add support for 5 or more authors, and start with a menu listing the options, and allowing the user to select the works, then on to the other operations.
  3. (1%) Add support more two or more adjacent words, such as "Lady MacBeth " or "to be or not to be".
Changed:
<
<
  1. (2%) Add support to search for two or more words, not necessarily adjacent, in the same paragraph. For example, find paragrpahs that incude the words <a name="12"></a>"labour'st", "<a name="14"></a>accommodations", and "<a name="34"></a>Dreaming".
  2. (1%) Add support to search for words within some specified numbers of word apart. E.g. search for paragraphs with "accommodations", and <a name="34"></a>"dreaming" with less then 3 words between (either order).
>
>
  1. (2%) Add support to search for two or more words, not necessarily adjacent, in the same paragraph. For example, find paragraphs that incude the words "King", "Rosencrantz", and "Guildenstern".
  2. (1%) Add support to search for words within some specified numbers of word apart. E.g. search for paragraphs with "King" and "Rosencrantz" with less then 3 words between (either order).
 
  1. (2%) Add Stemming (see instructor if you wish to try this)
  2. You propose your own!!
Changed:
<
<

The Class definitions

>
>

The Book Class definition

  %CODE{"c++"}%
Changed:
<
<
class paragraph { private: string text; public: paragraph(); void setText(string p); // Put (or replace) the text in a paragraph bool search(string word); // Search this paragraph for this word. void display(); // Display this paragraph };

class book {

>
>
class Book {
 private: string title;
Changed:
<
<
vector paragraphs;
>
>
vector lines; string searchWord; int searchPos; vector getWords(string line); string removeSpecials(string str); int countMatchesInLine(string line, string word);

 public:
Changed:
<
<
book(); void setTitle(string title); // Set the title of this book
>
>
Book(); void setTitle(string aTitle); // Set the title of this book
  string getTitle(); // Get the title
Changed:
<
<
int countMatches(string word); // Return the number if time word appears in a Book void add(paragraph p); // add a paragraph to the end of the book; void clear(); // Clear the contents and title of it hAME void displayMatches(string word); // Display all paragraphs with word in it
>
>
int countMatches(string word); // Return the number of time word appears in a Book void addLine(string line); // add a line to the book; void clear(); // Clear the contents and title of book void startSearch(string word); // Start a search for getNextMatch string getNextMatch(); // retrieve the next line that matches from the findWord // Return empty string when done bool searchDone(); // Return true if search is complete
 };
Deleted:
<
<
  %ENDCODE%
Added:
>
>

Some private helper functions to use within Book

  %CODE{"c++"}%
Changed:
<
<
string readParagraph( istream& is ) { string line; string paragraph; int lineNum = 0;;

//scan for the next paragraph

>
>
vector Book::getWords(string line) { istringstream iss(line); vector words; string s;
  do {
Changed:
<
<
getline( is , line ); } while (line.length() == 0 && is.eof());

// return nothing if eof if (is.eof()) { return "";

>
>
iss >> s; if (s.length() > 0 && s = " ") { words.push_back(s); //cout << s << " ";
  }
Changed:
<
<
// Get the next paragraph do { // Only put a newline after first line if (lineNum++ > 0) { paragraph += "\n";
>
>
s = ""; } while (iss); return words;
  }
Deleted:
<
<
paragraph += line; getline(is, line); } while (line.length() > 0 && is.eof());
 
Changed:
<
<
return paragraph;
>
>
string Book::removeSpecials(string str) { int i = 0, len = str.length(); while (i < len) { char c = str[i]; if (((c >= '0')&&(c <= '9')) || ((c >= 'A')&&(c <= 'Z')) || ((c >= 'a')&&(c <= 'z')) || c = '\'' || c = ' ') { if ((c >= 'A')&&(c <= 'Z')) str[i] += 32; //Assuming dictionary contains small letters only. ++i; } else { str.erase(i, 1); --len; } } return str;
 } %ENDCODE%
Changed:
<
<
The program should have a vector of book.
>
>
The program should have a vector of Book.
 

Processing

Changed:
<
<

C_-_shakespeare.png
>
>
What you will need to do is complete and use the Book class as defined above. You should define and write helper functions as needed to break your work up into useful modules. For example, you could write a function to read the lines out of the file, and load them into the vector of books. You might also create a function to see if it is a book title, or an end of book line. Below is the process to load the books.

ShakespeareRead.png

Once the books are loaded, you should ask the user for a word to search for, and then call the Book class for each book to see how many matches are in each book, and then display the book names for each book.

Then ask for a word to search for. Then you can call Books countMatches() function to see, and display, the number of words matched in each book. The countMatches function should go through the lines in the book, remove the special characters and change to lower case using removeSpecials(), and then break the line into a vector of words using getWords(), and then count the number of words that match in the line, adding it to the total.

THen the user can select a book to show the lines matching in, and display them. This should be done by startSearch() command to set up the search. then call getNextMatch() to get the next line with a match. Use searchDone() to determine if the end of the book is reached. startSearch() needs only to set searchWord to the word to find, and searchPos to line 0 (the first line in the book). getNextMatch() can then look at each line, starting at searchPos, to check if countMatches() is non-zero. If so return that line. Also always increment searchPos to the next line. If the end of the book is reached, you can set the searchPos to -1 to single the search is done. Then searchDone() can return true is searchPos is -1;

 

Run Example

Changed:
<
<
Wellcome to the Shakespeare word lookup program
Number of books: 38 1. THE SONNETS(155) 2. ALLS WELL THAT ENDS WELL(150) 3. THE TRAGEDY OF ANTONY AND CLEOPATRA(271) 4. AS YOU LIKE IT(165) 5. THE COMEDY OF ERRORS(111) 6. THE TRAGEDY OF CORIOLANUS(231) 7. CYMBELINE(197) 8. THE TRAGEDY OF HAMLET, PRINCE OF DENMARK(234) 9. THE FIRST PART OF KING HENRY THE FOURTH(166) 10. SECOND PART OF KING HENRY IV(189) 11. THE LIFE OF KING HENRY THE FIFTH(183) 12. THE FIRST PART OF HENRY THE SIXTH(220) 13. THE SECOND PART OF KING HENRY THE SIXTH(201) 14. THE THIRD PART OF KING HENRY THE SIXTH(187) 15. KING HENRY THE EIGHTH(170) 16. KING JOHN(136) 17. THE TRAGEDY OF JULIUS CAESAR(143) 18. THE TRAGEDY OF KING LEAR(220) 19. LOVE'S LABOUR'S LOST(103) 20. THE TRAGEDY OF MACBETH(189) 21. MEASURE FOR MEASURE(146) 22. THE MERCHANT OF VENICE(133) 23. THE MERRY WIVES OF WINDSOR(220) 24. A MIDSUMMER NIGHT'S DREAM(132) 25. MUCH ADO ABOUT NOTHING(132) 26. THE TRAGEDY OF OTHELLO, MOOR OF VENICE(165) 27. KING RICHARD THE SECOND(142) 28. KING RICHARD III(256) 29. THE TRAGEDY OF ROMEO AND JULIET(205) 30. THE TAMING OF THE SHREW(165) 31. THE TEMPEST(122) 32. THE LIFE OF TIMON OF ATHENS(162) 33. THE TRAGEDY OF TITUS ANDRONICUS(140) 34. THE HISTORY OF TROILUS AND CRESSIDA(223) 35. TWELFTH NIGHT; OR, WHAT YOU WILL(177) 36. THE TWO GENTLEMEN OF VERONA(127) 37. THE WINTER'S TALE(127) 38. A LOVER'S COMPLAINT(48)
Enter a word to search for:sail 1. THE SONNETS has 5 matches. 2. ALLS WELL THAT ENDS WELL has 1 matches. 3. THE TRAGEDY OF ANTONY AND CLEOPATRA has 7 matches. 4. AS YOU LIKE IT has 1 matches. 5. THE COMEDY OF ERRORS has 2 matches. 6. THE TRAGEDY OF CORIOLANUS has 1 matches. 7. CYMBELINE has 5 matches. 8. THE TRAGEDY OF HAMLET, PRINCE OF DENMARK has 5 matches. 10. SECOND PART OF KING HENRY IV has 2 matches. 11. THE LIFE OF KING HENRY THE FIFTH has 3 matches. 12. THE FIRST PART OF HENRY THE SIXTH has 2 matches. 13. THE SECOND PART OF KING HENRY THE SIXTH has 3 matches. 14. THE THIRD PART OF KING HENRY THE SIXTH has 6 matches. 16. KING JOHN has 5 matches. 17. THE TRAGEDY OF JULIUS CAESAR has 1 matches. 19. LOVE'S LABOUR'S LOST has 2 matches. 20. THE TRAGEDY OF MACBETH has 3 matches. 22. THE MERCHANT OF VENICE has 6 matches. 23. THE MERRY WIVES OF WINDSOR has 1 matches. 24. A MIDSUMMER NIGHT'S DREAM has 2 matches. 25. MUCH ADO ABOUT NOTHING has 1 matches. 26. THE TRAGEDY OF OTHELLO, MOOR OF VENICE has 9 matches. 27. KING RICHARD THE SECOND has 1 matches. 28. KING RICHARD III has 3 matches. 29. THE TRAGEDY OF ROMEO AND JULIET has 4 matches. 30. THE TAMING OF THE SHREW has 1 matches. 31. THE TEMPEST has 8 matches. 34. THE HISTORY OF TROILUS AND CRESSIDA has 5 matches. 35. TWELFTH NIGHT; OR, WHAT YOU WILL has 5 matches. 38. A LOVER'S COMPLAINT has 1 matches. To display the paragraphs containing "sail" enter the number of the book, or 0 to search for another word: 28 Paragraphs from KING RICHARD III containing the word sail GLOUCESTER. I pray you all, tell me what they deserve That do conspire my death with devilish plots Of damned witchcraft, and that have prevail'd Upon my body with their hellish charms? HASTINGS. The tender love I bear your Grace, my lord, Makes me most forward in this princely presence To doom th' offenders, whosoe'er they be. I say, my lord, they have deserved death. GLOUCESTER. Then be your eyes the witness of their evil. Look how I am bewitch'd; behold, mine arm Is like a blasted sapling wither'd up. And this is Edward's wife, that monstrous witch, Consorted with that harlot strumpet Shore, That by their witchcraft thus have marked me. HASTINGS. If they have done this deed, my noble lord- GLOUCESTER. If?-thou protector of this damned strumpet, Talk'st thou to me of ifs? Thou art a traitor. Off with his head! Now by Saint Paul I swear I will not dine until I see the same. Lovel and Ratcliff, look that it be done. The rest that love me, rise and follow me. Exeunt all but HASTINGS, LOVEL, and RATCLIFF HASTINGS. Woe, woe, for England! not a whit for me; For I, too fond, might have prevented this. STANLEY did dream the boar did raze our helms, And I did scorn it and disdain to fly. Three times to-day my foot-cloth horse did stumble, And started when he look'd upon the Tower, As loath to bear me to the slaughter-house. O, now I need the priest that spake to me! I now repent I told the pursuivant, As too triumphing, how mine enemies To-day at Pomfret bloodily were butcher'd, And I myself secure in grace and favour. O Margaret, Margaret, now thy heavy curse Is lighted on poor Hastings' wretched head! RATCLIFF. Come, come, dispatch; the Duke would be at dinner. Make a short shrift; he longs to see your head. HASTINGS. O momentary grace of mortal men, Which we more hunt for than the grace of God! Who builds his hope in air of your good looks Lives like a drunken sailor on a mast, Ready with every nod to tumble down Into the fatal bowels of the deep. LOVEL. Come, come, dispatch; 'tis bootless to exclaim. HASTINGS. O bloody Richard! Miserable England! I prophesy the fearfull'st time to thee That ever wretched age hath look'd upon. Come, lead me to the block; bear him my head. They smile at me who shortly shall be dead. Exeunt -------------------------------------------------------------------------- KING RICHARD. Who intercepts me in my expedition? DUCHESS. O, she that might have intercepted thee, By strangling thee in her accursed womb, From all the slaughters, wretch, that thou hast done! QUEEN ELIZABETH. Hidest thou that forehead with a golden crown Where't should be branded, if that right were right, The slaughter of the Prince that ow'd that crown, And the dire death of my poor sons and brothers? Tell me, thou villain slave, where are my children? DUCHESS. Thou toad, thou toad, where is thy brother Clarence? And little Ned Plantagenet, his son? QUEEN ELIZABETH. Where is the gentle Rivers, Vaughan, Grey? DUCHESS. Where is kind Hastings? KING RICHARD. A flourish, trumpets! Strike alarum, drums! Let not the heavens hear these tell-tale women Rail on the Lord's anointed. Strike, I say! [Flourish. Alarums] Either be patient and entreat me fair, Or with the clamorous report of war Thus will I drown your exclamations. DUCHESS. Art thou my son? KING RICHARD. Ay, I thank God, my father, and yourself. DUCHESS. Then patiently hear my impatience. KING RICHARD. Madam, I have a touch of your condition That cannot brook the accent of reproof. DUCHESS. O, let me speak! KING RICHARD. Do, then; but I'll not hear. DUCHESS. I will be mild and gentle in my words. KING RICHARD. And brief, good mother; for I am in haste. DUCHESS. Art thou so hasty? I have stay'd for thee, God knows, in torment and in agony. KING RICHARD. And came I not at last to comfort you? DUCHESS. No, by the holy rood, thou know'st it well Thou cam'st on earth to make the earth my hell. A grievous burden was thy birth to me; Tetchy and wayward was thy infancy; Thy school-days frightful, desp'rate, wild, and furious; Thy prime of manhood daring, bold, and venturous; Thy age confirm'd, proud, subtle, sly, and bloody, More mild, but yet more harmful-kind in hatred. What comfortable hour canst thou name That ever grac'd me with thy company? KING RICHARD. Faith, none but Humphrey Hour, that call'd your Grace To breakfast once forth of my company. If I be so disgracious in your eye, Let me march on and not offend you, madam. Strike up the drum. DUCHESS. I prithee hear me speak. KING RICHARD. You speak too bitterly. DUCHESS. Hear me a word; For I shall never speak to thee again. KING RICHARD. So. DUCHESS. Either thou wilt die by God's just ordinance Ere from this war thou turn a conqueror; Or I with grief and extreme age shall perish And never more behold thy face again. Therefore take with thee my most grievous curse, Which in the day of battle tire thee more Than all the complete armour that thou wear'st! My prayers on the adverse party fight; And there the little souls of Edward's children Whisper the spirits of thine enemies And promise them success and victory. Bloody thou art; bloody will be thy end. Shame serves thy life and doth thy death attend. Exit QUEEN ELIZABETH. Though far more cause, yet much less spirit to curse Abides in me; I say amen to her. KING RICHARD. Stay, madam, I must talk a word with you. QUEEN ELIZABETH. I have no moe sons of the royal blood For thee to slaughter. For my daughters, Richard, They shall be praying nuns, not weeping queens; And therefore level not to hit their lives. KING RICHARD. You have a daughter call'd Elizabeth. Virtuous and fair, royal and gracious. QUEEN ELIZABETH. And must she die for this? O, let her live, And I'll corrupt her manners, stain her beauty, Slander myself as false to Edward's bed, Throw over her the veil of infamy; So she may live unscarr'd of bleeding slaughter, I will confess she was not Edward's daughter. KING RICHARD. Wrong not her birth; she is a royal Princess. QUEEN ELIZABETH. To save her life I'll say she is not so. KING RICHARD. Her life is safest only in her birth. QUEEN ELIZABETH. And only in that safety died her brothers. KING RICHARD. Lo, at their birth good stars were opposite. QUEEN ELIZABETH. No, to their lives ill friends were contrary. KING RICHARD. All unavoided is the doom of destiny. QUEEN ELIZABETH. True, when avoided grace makes destiny. My babes were destin'd to a fairer death, If grace had bless'd thee with a fairer life. KING RICHARD. You speak as if that I had slain my cousins. QUEEN ELIZABETH. Cousins, indeed; and by their uncle cozen'd Of comfort, kingdom, kindred, freedom, life. Whose hand soever lanc'd their tender hearts, Thy head, an indirectly, gave direction. No doubt the murd'rous knife was dull and blunt Till it was whetted on thy stone-hard heart To revel in the entrails of my lambs. But that stiff use of grief makes wild grief tame, My tongue should to thy ears not name my boys Till that my nails were anchor'd in thine eyes; And I, in such a desp'rate bay of death, Like a poor bark, of sails and tackling reft, Rush all to pieces on thy rocky bosom. KING RICHARD. Madam, so thrive I in my enterprise And dangerous success of bloody wars, As I intend more good to you and yours Than ever you or yours by me were harm'd! QUEEN ELIZABETH. What good is cover'd with the face of heaven, To be discover'd, that can do me good? KING RICHARD. advancement of your children, gentle lady. QUEEN ELIZABETH. Up to some scaffold, there to lose their heads? KING RICHARD. Unto the dignity and height of Fortune, The high imperial type of this earth's glory. QUEEN ELIZABETH. Flatter my sorrow with report of it; Tell me what state, what dignity, what honour, Canst thou demise to any child of mine? KING RICHARD. Even all I have-ay, and myself and all Will I withal endow a child of thine; So in the Lethe of thy angry soul Thou drown the sad remembrance of those wrongs Which thou supposest I have done to thee. QUEEN ELIZABETH. Be brief, lest that the process of thy kindness Last longer telling than thy kindness' date. KING RICHARD. Then know, that from my soul I love thy daughter. QUEEN ELIZABETH. My daughter's mother thinks it with her soul. KING RICHARD. What do you think? QUEEN ELIZABETH. That thou dost love my daughter from thy soul. So from thy soul's love didst thou love her brothers, And from my heart's love I do thank thee for it. KING RICHARD. Be not so hasty to confound my meaning. I mean that with my soul I love thy daughter And do intend to make her Queen of England. QUEEN ELIZABETH. Well, then, who dost thou mean shall be her king? KING RICHARD. Even he that makes her Queen. Who else should be? QUEEN ELIZABETH. What, thou? KING RICHARD. Even so. How think you of it? QUEEN ELIZABETH. How canst thou woo her? KING RICHARD. That would I learn of you, As one being best acquainted with her humour. QUEEN ELIZABETH. And wilt thou learn of me? KING RICHARD. Madam, with all my heart. QUEEN ELIZABETH. Send to her, by the man that slew her brothers, A pair of bleeding hearts; thereon engrave 'Edward' and 'York.' Then haply will she weep; Therefore present to her-as sometimes Margaret Did to thy father, steep'd in Rutland's blood- A handkerchief; which, say to her, did drain The purple sap from her sweet brother's body, And bid her wipe her weeping eyes withal. If this inducement move her not to love, Send her a letter of thy noble deeds; Tell her thou mad'st away her uncle Clarence, Her uncle Rivers; ay, and for her sake Mad'st quick conveyance with her good aunt Anne. KING RICHARD. You mock me, madam; this is not the way To win your daughter. QUEEN ELIZABETH. There is no other way; Unless thou couldst put on some other shape And not be Richard that hath done all this. KING RICHARD. Say that I did all this for love of her. QUEEN ELIZABETH. Nay, then indeed she cannot choose but hate thee, Having bought love with such a bloody spoil. KING RICHARD. Look what is done cannot be now amended. Men shall deal unadvisedly sometimes, Which after-hours gives leisure to repent. If I did take the kingdom from your sons, To make amends I'll give it to your daughter. If I have kill'd the issue of your womb, To quicken your increase I will beget Mine issue of your blood upon your daughter. A grandam's name is little less in love Than is the doating title of a mother; They are as children but one step below, Even of your metal, of your very blood; Of all one pain, save for a night of groans Endur'd of her, for whom you bid like sorrow. Your children were vexation to your youth; But mine shall be a comfort to your age. The loss you have is but a son being King, And by that loss your daughter is made Queen. I cannot make you what amends I would, Therefore accept such kindness as I can. Dorset your son, that with a fearful soul Leads discontented steps in foreign soil, This fair alliance quickly shall can home To high promotions and great dignity. The King, that calls your beauteous daughter wife, Familiarly shall call thy Dorset brother; Again shall you be mother to a king, And all the ruins of distressful times Repair'd with double riches of content. What! we have many goodly days to see. The liquid drops of tears that you have shed Shall come again, transform'd to orient pearl, Advantaging their loan with interest Of ten times double gain of happiness. Go, then, my mother, to thy daughter go; Make bold her bashful years with your experience; Prepare her ears to hear a wooer's tale; Put in her tender heart th' aspiring flame Of golden sovereignty; acquaint the Princes With the sweet silent hours of marriage joys. And when this arm of mine hath chastised The petty rebel, dull-brain'd Buckingham, Bound with triumphant garlands will I come, And lead thy daughter to a conqueror's bed; To whom I will retail my conquest won, And she shall be sole victoress, Caesar's Caesar. QUEEN ELIZABETH. What were I best to say? Her father's brother Would be her lord? Or shall I say her uncle? Or he that slew her brothers and her uncles? Under what title shall I woo for thee That God, the law, my honour, and her love Can make seem pleasing to her tender years? KING RICHARD. Infer fair England's peace by this alliance. QUEEN ELIZABETH. Which she shall purchase with still-lasting war. KING RICHARD. Tell her the King, that may command, entreats. QUEEN ELIZABETH. That at her hands which the King's King forbids. KING RICHARD. Say she shall be a high and mighty queen. QUEEN ELIZABETH. To wail the title, as her mother doth. KING RICHARD. Say I will love her everlastingly. QUEEN ELIZABETH. But how long shall that title 'ever' last? KING RICHARD. Sweetly in force unto her fair life's end. QUEEN ELIZABETH. But how long fairly shall her sweet life last? KING RICHARD. As long as heaven and nature lengthens it. QUEEN ELIZABETH. As long as hell and Richard likes of it. KING RICHARD. Say I, her sovereign, am her subject low. QUEEN ELIZABETH. But she, your subject, loathes such sovereignty. KING RICHARD. Be eloquent in my behalf to her. QUEEN ELIZABETH. An honest tale speeds best being plainly told. KING RICHARD. Then plainly to her tell my loving tale. QUEEN ELIZABETH. Plain and not honest is too harsh a style. KING RICHARD. Your reasons are too shallow and too quick. QUEEN ELIZABETH. O, no, my reasons are too deep and dead- Too deep and dead, poor infants, in their graves. KING RICHARD. Harp not on that string, madam; that is past. QUEEN ELIZABETH. Harp on it still shall I till heartstrings break. KING RICHARD. Now, by my George, my garter, and my crown- QUEEN ELIZABETH. Profan'd, dishonour'd, and the third usurp'd. KING RICHARD. I swear- QUEEN ELIZABETH. By nothing; for this is no oath: Thy George, profan'd, hath lost his lordly honour; Thy garter, blemish'd, pawn'd his knightly virtue; Thy crown, usurp'd, disgrac'd his kingly glory. If something thou wouldst swear to be believ'd, Swear then by something that thou hast not wrong'd. KING RICHARD. Then, by my self- QUEEN ELIZABETH. Thy self is self-misus'd. KING RICHARD. Now, by the world- QUEEN ELIZABETH. 'Tis full of thy foul wrongs. KING RICHARD. My father's death- QUEEN ELIZABETH. Thy life hath it dishonour'd. KING RICHARD. Why, then, by God- QUEEN ELIZABETH. God's wrong is most of all. If thou didst fear to break an oath with Him, The unity the King my husband made Thou hadst not broken, nor my brothers died. If thou hadst fear'd to break an oath by Him, Th' imperial metal, circling now thy head, Had grac'd the tender temples of my child; And both the Princes had been breathing here, Which now, two tender bedfellows for dust, Thy broken faith hath made the prey for worms. What canst thou swear by now? KING RICHARD. The time to come. QUEEN ELIZABETH. That thou hast wronged in the time o'erpast; For I myself have many tears to wash Hereafter time, for time past wrong'd by thee. The children live whose fathers thou hast slaughter'd, Ungovern'd youth, to wail it in their age; The parents live whose children thou hast butcheed, Old barren plants, to wail it with their age. Swear not by time to come; for that thou hast Misus'd ere us'd, by times ill-us'd o'erpast. KING RICHARD. As I intend to prosper and repent, So thrive I in my dangerous affairs Of hostile arms! Myself myself confound! Heaven and fortune bar me happy hours! Day, yield me not thy light; nor, night, thy rest! Be opposite all planets of good luck To my proceeding!-if, with dear heart's love, Immaculate devotion, holy thoughts, I tender not thy beauteous princely daughter. In her consists my happiness and thine; Without her, follows to myself and thee, Herself, the land, and many a Christian soul, Death, desolation, ruin, and decay. It cannot be avoided but by this; It will not be avoided but by this. Therefore, dear mother-I must call you so- Be the attorney of my love to her; Plead what I will be, not what I have been; Not my deserts, but what I will deserve. Urge the necessity and state of times, And be not peevish-fond in great designs. QUEEN ELIZABETH. Shall I be tempted of the devil thus? KING RICHARD. Ay, if the devil tempt you to do good. QUEEN ELIZABETH. Shall I forget myself to be myself? KING RICHARD. Ay, if your self's remembrance wrong yourself. QUEEN ELIZABETH. Yet thou didst kill my children. KING RICHARD. But in your daughter's womb I bury them; Where, in that nest of spicery, they will breed Selves of themselves, to your recomforture. QUEEN ELIZABETH. Shall I go win my daughter to thy will? KING RICHARD. And be a happy mother by the deed. QUEEN ELIZABETH. I go. Write to me very shortly, And you shall understand from me her mind. KING RICHARD. Bear her my true love's kiss; and so, farewell. Kissing her. Exit QUEEN ELIZABETH Relenting fool, and shallow, changing woman! -------------------------------------------------------------------------- FOURTH MESSENGER. Sir Thomas Lovel and Lord Marquis Dorset, 'Tis said, my liege, in Yorkshire are in arms. But this good comfort bring I to your Highness- The Britaine navy is dispers'd by tempest. Richmond in Dorsetshire sent out a boat Unto the shore, to ask those on the banks If they were his assistants, yea or no; Who answer'd him they came from Buckingham Upon his party. He, mistrusting them, Hois'd sail, and made his course again for Britaine. KING RICHARD. March on, march on, since we are up in arms; If not to fight with foreign enemies, Yet to beat down these rebels here at home. --------------------------------------------------------------------------
>
>
Number of books: 38
1. THE SONNETS
2. ALLS WELL THAT ENDS WELL
3. THE TRAGEDY OF ANTONY AND CLEOPATRA
4. AS YOU LIKE IT
5. THE COMEDY OF ERRORS
6. THE TRAGEDY OF CORIOLANUS
7. CYMBELINE
8. THE TRAGEDY OF HAMLET, PRINCE OF DENMARK
9. THE FIRST PART OF KING HENRY THE FOURTH
10. SECOND PART OF KING HENRY IV
11. THE LIFE OF KING HENRY THE FIFTH
12. THE FIRST PART OF HENRY THE SIXTH
13. THE SECOND PART OF KING HENRY THE SIXTH
14. THE THIRD PART OF KING HENRY THE SIXTH
15. KING HENRY THE EIGHTH
16. KING JOHN
17. THE TRAGEDY OF JULIUS CAESAR
18. THE TRAGEDY OF KING LEAR
19. LOVE'S LABOUR'S LOST
20. THE TRAGEDY OF MACBETH
21. MEASURE FOR MEASURE
22. THE MERCHANT OF VENICE
23. THE MERRY WIVES OF WINDSOR
24. A MIDSUMMER NIGHT'S DREAM
25. MUCH ADO ABOUT NOTHING
26. THE TRAGEDY OF OTHELLO, MOOR OF VENICE
27. KING RICHARD THE SECOND
28. KING RICHARD III
29. THE TRAGEDY OF ROMEO AND JULIET
30. THE TAMING OF THE SHREW
31. THE TEMPEST
32. THE LIFE OF TIMON OF ATHENS
33. THE TRAGEDY OF TITUS ANDRONICUS
34. THE HISTORY OF TROILUS AND CRESSIDA
35. TWELFTH NIGHT; OR, WHAT YOU WILL
36. THE TWO GENTLEMEN OF VERONA
37. THE WINTER'S TALE
38. A LOVER'S COMPLAINT
Enter a word to search for (* to end):rascal
1. THE SONNETS Matches: 0
2. ALLS WELL THAT ENDS WELL Matches: 1
3. THE TRAGEDY OF ANTONY AND CLEOPATRA Matches: 0
4. AS YOU LIKE IT Matches: 1
5. THE COMEDY OF ERRORS Matches: 0
6. THE TRAGEDY OF CORIOLANUS Matches: 1
7. CYMBELINE Matches: 3
8. THE TRAGEDY OF HAMLET, PRINCE OF DENMARK Matches: 1
9. THE FIRST PART OF KING HENRY THE FOURTH Matches: 9
10. SECOND PART OF KING HENRY IV Matches: 9
11. THE LIFE OF KING HENRY THE FIFTH Matches: 3
12. THE FIRST PART OF HENRY THE SIXTH Matches: 0
13. THE SECOND PART OF KING HENRY THE SIXTH Matches: 3
14. THE THIRD PART OF KING HENRY THE SIXTH Matches: 0
15. KING HENRY THE EIGHTH Matches: 0
16. KING JOHN Matches: 0
17. THE TRAGEDY OF JULIUS CAESAR Matches: 1
18. THE TRAGEDY OF KING LEAR Matches: 6
19. LOVE'S LABOUR'S LOST Matches: 0
20. THE TRAGEDY OF MACBETH Matches: 0
21. MEASURE FOR MEASURE Matches: 3
22. THE MERCHANT OF VENICE Matches: 0
23. THE MERRY WIVES OF WINDSOR Matches: 2
24. A MIDSUMMER NIGHT'S DREAM Matches: 0
25. MUCH ADO ABOUT NOTHING Matches: 0
26. THE TRAGEDY OF OTHELLO, MOOR OF VENICE Matches: 1
27. KING RICHARD THE SECOND Matches: 0
28. KING RICHARD III Matches: 0
29. THE TRAGEDY OF ROMEO AND JULIET Matches: 0
30. THE TAMING OF THE SHREW Matches: 4
31. THE TEMPEST Matches: 0
32. THE LIFE OF TIMON OF ATHENS Matches: 3
33. THE TRAGEDY OF TITUS ANDRONICUS Matches: 0
34. THE HISTORY OF TROILUS AND CRESSIDA Matches: 2
35. TWELFTH NIGHT; OR, WHAT YOU WILL Matches: 2
36. THE TWO GENTLEMEN OF VERONA Matches: 0
37. THE WINTER'S TALE Matches: 1
38. A LOVER'S COMPLAINT Matches: 0
To display the paragraphs containing rascal enter the number of the book, or 0 to search for another word: 9
  Prince. I comes forward I Peace, ye fat-kidney'd rascal! What a
  Fal. I am accurs'd to rob in that thief's company. The rascal hath
    with the rogue's company. If the rascal have not given me
    action. Zounds, an I were now by this rascal, I could brain him
    rascal is this! an infidel! Ha! you shall see now, in very
  Fal. Well, that rascal hath good metal in him; he will not run.
  Prince. Why, what a rascal art thou then, to praise him so for
  Prince. This oily rascal is known as well as Paul's. Go call him
    whoreson, impudent, emboss'd rascal, if there were anything in

To display the paragraphs containing rascal enter the number of the book, or 0 to search for another word: 30
    I bade the rascal knock upon your gate,
    While she did call me rascal fiddler
    And bring along these rascal knaves with thee?
    What dogs are these? Where is the rascal cook?

To display the paragraphs containing rascal enter the number of the book, or 0 to search for another word: 29

To display the paragraphs containing rascal enter the number of the book, or 0 to search for another word: 0
Enter a word to search for (* to end):brain
1. THE SONNETS Matches: 5
2. ALLS WELL THAT ENDS WELL Matches: 0
3. THE TRAGEDY OF ANTONY AND CLEOPATRA Matches: 5
4. AS YOU LIKE IT Matches: 3
5. THE COMEDY OF ERRORS Matches: 0
6. THE TRAGEDY OF CORIOLANUS Matches: 3
7. CYMBELINE Matches: 9
8. THE TRAGEDY OF HAMLET, PRINCE OF DENMARK Matches: 6
9. THE FIRST PART OF KING HENRY THE FOURTH Matches: 1
10. SECOND PART OF KING HENRY IV Matches: 4
11. THE LIFE OF KING HENRY THE FIFTH Matches: 1
12. THE FIRST PART OF HENRY THE SIXTH Matches: 0
13. THE SECOND PART OF KING HENRY THE SIXTH Matches: 2
14. THE THIRD PART OF KING HENRY THE SIXTH Matches: 0
15. KING HENRY THE EIGHTH Matches: 2
16. KING JOHN Matches: 1
17. THE TRAGEDY OF JULIUS CAESAR Matches: 0
18. THE TRAGEDY OF KING LEAR Matches: 2
19. LOVE'S LABOUR'S LOST Matches: 4
20. THE TRAGEDY OF MACBETH Matches: 4
21. MEASURE FOR MEASURE Matches: 0
22. THE MERCHANT OF VENICE Matches: 1
23. THE MERRY WIVES OF WINDSOR Matches: 2
24. A MIDSUMMER NIGHT'S DREAM Matches: 0
25. MUCH ADO ABOUT NOTHING Matches: 2
26. THE TRAGEDY OF OTHELLO, MOOR OF VENICE Matches: 2
27. KING RICHARD THE SECOND Matches: 1
28. KING RICHARD III Matches: 0
29. THE TRAGEDY OF ROMEO AND JULIET Matches: 3
30. THE TAMING OF THE SHREW Matches: 0
31. THE TEMPEST Matches: 2
32. THE LIFE OF TIMON OF ATHENS Matches: 0
33. THE TRAGEDY OF TITUS ANDRONICUS Matches: 0
34. THE HISTORY OF TROILUS AND CRESSIDA Matches: 9
35. TWELFTH NIGHT; OR, WHAT YOU WILL Matches: 3
36. THE TWO GENTLEMEN OF VERONA Matches: 0
37. THE WINTER'S TALE Matches: 2
38. A LOVER'S COMPLAINT Matches: 0
To display the paragraphs containing brain enter the number of the book, or 0 to search for another word: 19
    That hath a mint of phrases in his brain;
    Other slow arts entirely keep the brain;
    Lives not alone immured in the brain,
    To weed this wormwood from your fruitful brain,

To display the paragraphs containing brain enter the number of the book, or 0 to search for another word: 2

To display the paragraphs containing brain enter the number of the book, or 0 to search for another word: 8
    Without more motive, into every brain
    Within the book and volume of my brain,
    And I do think- or else this brain of mine
    Fie upon't! foh! About, my brain! Hum, I have heard
    Queen. Sleep rock thy brain,
  Queen. This is the very coinage of your brain.

 
Changed:
<
<
To display the paragraphs containing "sail" enter the number of the book, or 0 to search for another word:
>
>
To display the paragraphs containing brain enter the number of the book, or 0 to search for another word: 0 Enter a word to search for (* to end):*
 
Changed:
<
<
  • Shakespeare.txt: Shakespeare.txt

  • BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg:
>
>
 
META FILEATTACHMENT attachment="Shakespeare.txt" attr="" comment="" date="1479329239" name="Shakespeare.txt" path="Shakespeare.txt" size="5465289" user="JimSkon" version="1"
META FILEATTACHMENT attachment="C_-_shakespeare.png" attr="" comment="" date="1478583816" name="C_-_shakespeare.png" path="C_-_shakespeare.png" size="19227" user="JimSkon" version="1"
META FILEATTACHMENT attachment="BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg" attr="" comment="" date="1475358444" name="BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg" path="BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg" size="73395" user="JimSkon" version="1"
Added:
>
>
META FILEATTACHMENT attachment="ShakespeareRead.png" attr="" comment="" date="1511847282" name="ShakespeareRead.png" path="ShakespeareRead.png" size="25679" user="JimSkon" version="1"

Revision 262017-11-28 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project - Shakespeare

Line: 33 to 33
 
  1. Read in the entire file of Shakespeare books, and parse it into Books and Paragraphs, where Books is object the contains an entire book (definition below), and Paragraph is an object representation of a paragraph (also below). Thus there will be an array of Books, and each Book will include a title plus an array of Paragraphs.
  2. Display a list of the book titles, along with the number of paragraphs found in each book.
Changed:
<
<
  1. Ask the user for a word to search for, and then display a list of the books that contain that word, along with the number of Paragraphs in that book that contain that word. (See program run example below)
  2. Repeat steps 2 and 3 until the user is done.
>
>
  1. Ask the user for a word to search for, and then display a numbered list of the books that contain that word, along with the number of Paragraphs in that book that contain that word. (See program run example below)
  2. If the user enters in a number, show each matching paragraph from that book.
  3. Repeat steps 2, 3 and 4until the user is done.
 A paragraph, for the purposes of this project, is defined as a series of lines in a book what are contiguous. So a paragraph boundary is one (or more) blank line between other lines of code. This is the closest appoximation we can make to determine paragraphs. Some of the paragraphs will be quite big. There should never be an empty paragraph.

What to turn in

Line: 56 to 57
  Some options:
Deleted:
<
<
  1. (1%) Make search match only match whole words e.g. a substring delineated by a newline, spaces or "(" before, and one of the following after: . " ' ? ! : ; ) - \n
  2. (1%) Option to view the paragraphs with the matching word for a selected book.
 
  1. (1%) Highlight the matching words (bold or color) in the above option.
  2. (1%) Make searches case insensitive (so searching for "king" matches "king", "King", and "KING", for example.
  3. (1%) Add an option to show the matching paragraphs from a selected book (shown in the example below).
Line: 65 to 64
 
  1. (1%) Add support for a second author or set of works. The second file must be at least 1Mb, and you will need to format it appropriately.
  2. (2%) Add support for 5 or more authors, and start with a menu listing the options, and allowing the user to select the works, then on to the other operations.
  3. (1%) Add support more two or more adjacent words, such as "Lady MacBeth " or "to be or not to be".
Changed:
<
<
  1. (2%) Add support to search for two or more words, not necessarily adjacent, in the same paragraph. For example, find paragrpahs that incude the words "labour'st", "accommodations", and "Dreaming".
  2. (1%) Add support to search for words within some specified numbers of word apart. E.g. search for paragraphs with "accommodations", and "dreaming" with less then 3 words between (either order).
>
>
  1. (2%) Add support to search for two or more words, not necessarily adjacent, in the same paragraph. For example, find paragrpahs that incude the words <a name="12"></a>"labour'st", "<a name="14"></a>accommodations", and "<a name="34"></a>Dreaming".
  2. (1%) Add support to search for words within some specified numbers of word apart. E.g. search for paragraphs with "accommodations", and <a name="34"></a>"dreaming" with less then 3 words between (either order).
 
  1. (2%) Add Stemming (see instructor if you wish to try this)
  2. You propose your own!!

The Class definitions

Revision 252017-05-04 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project - Shakespeare

Changed:
<
<

Due: May 4, 11:55pm

>
>

Due: May 5, 11:55pm

 
(No late submissions allowed)
Changed:
<
<
Moodle Link
BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg
>
>
Moodle Link
BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg
 

Instructions

  • Turn in the code (a cpp file), and the run outputs as requested below.

Revision 242017-01-17 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project - Shakespeare

Changed:
<
<

Due: Dec 12, 11:55pm

>
>

Due: May 4, 11:55pm

 
(No late submissions allowed)
Added:
>
>
Moodle Link
 
BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg

Instructions

Revision 232016-12-23 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project - Shakespeare

Line: 19 to 19
 
C++ code includes comments, with project information at top, pre and post conditions
for each functions and other comments as needed.
  5  
The C++ code has good formatting, indentation, and organization.   5  
Good variable and function names, appropriate use of constants rather then literal numbers.   5  
Changed:
<
<
Runs: Run of game works correct (run until the cards run out at least twice)   40  
>
>
Runs: Run of game works correct (Run for given test cases)   40  
 
Total   100  

Problem

Shakespeare Word Search

Revision 222016-12-05 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project - Shakespeare

Line: 7 to 7
 
BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg

Instructions

Changed:
<
<
  • Turn in the code (a cpp file or ideone.com link), and the run outputs as requested below.
>
>
  • Turn in the code (a cpp file), and the run outputs as requested below.
 
  • Remember to format the code as described and the book and text, and to include comments including complete commetns at the beginning of the program.

Grading

Changed:
<
<
Feature %
Program correctness and completeness with respect to defination 70%
Code Format (Indenting, variable names) 10%
Code Comments 10%
Turning in the run the requested inputs below.. 10%
Turn in a list of extra features added, with a total of points being sought  
>
>

Grading Table

Requirement Grading Comments Points Score
Easy to use user interface   5  
Functional decomposition: Program should be factored into functions to reduce complexity.
"main()" should not be one be function, but should be divided into supporting functions
(Like "readBooks(bookVector, filestream)".
  10  
Class Design: Classes have appropriate methods added as needed, new classes well designed   10  
Class Implementation : Logic is correctly implements in the each class methods   20  
C++ code includes comments, with project information at top, pre and post conditions
for each functions and other comments as needed.
  5  
The C++ code has good formatting, indentation, and organization.   5  
Good variable and function names, appropriate use of constants rather then literal numbers.   5  
Runs: Run of game works correct (run until the cards run out at least twice)   40  
Total   100  
 

Problem

Shakespeare Word Search

Revision 212016-11-16 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project - Shakespeare

Line: 22 to 22
  Your goal is to use Object Oriented techniques to read the complete works of Shakespeare from a file, and allow for word searches.
Changed:
<
<
A complete version of all works of Shakespeare in a single file is available here: Shakespeare.txt.
>
>
A complete version of all works of Shakespeare in a single file is available here: Shakespeare.txt.
If you right-click (ctrl-click on a Mac) on the lihk, you can download it to you computer. You can then copy it into the project folder for your c++ problem, and you will then be able to open it and use it from the project.
  Your program must do at least the following:
Line: 627 to 627
 
  • Shakespeare.txt: Shakespeare.txt

  • BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg:
Changed:
<
<
META FILEATTACHMENT attachment="Shakespeare.txt" attr="" comment="" date="1449757531" name="Shakespeare.txt" path="Shakespeare.txt" size="5465289" user="JimSkon" version="2"
>
>
META FILEATTACHMENT attachment="Shakespeare.txt" attr="" comment="" date="1479329239" name="Shakespeare.txt" path="Shakespeare.txt" size="5465289" user="JimSkon" version="1"
 
META FILEATTACHMENT attachment="C_-_shakespeare.png" attr="" comment="" date="1478583816" name="C_-_shakespeare.png" path="C_-_shakespeare.png" size="19227" user="JimSkon" version="1"
META FILEATTACHMENT attachment="BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg" attr="" comment="" date="1475358444" name="BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg" path="BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg" size="73395" user="JimSkon" version="1"

Revision 202016-11-09 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project - Shakespeare

Line: 24 to 24
  A complete version of all works of Shakespeare in a single file is available here: Shakespeare.txt.
Changed:
<
<
Your program must do at least the following:
>
>
Your program must do at least the following:
 
Changed:
<
<
  1. Read in the entire file of Shakespeare books, and parse it into Books and Paragraphs, where Books is object the contains an entire book (definition below), and Paragraph is an object representation of a paragraph (also below). Thus there will be an array of Books, and each book will be a title plus an array of paragraphs.
  2. Show the user a list of the book titles, alone with the number of paragraphs found in each.
  3. Ask the user for a word to search, and show the users how many paragraphs in each book has a match for this word.
  4. Repeat the above step until the user is done.
>
>
  1. Read in the entire file of Shakespeare books, and parse it into Books and Paragraphs, where Books is object the contains an entire book (definition below), and Paragraph is an object representation of a paragraph (also below). Thus there will be an array of Books, and each Book will include a title plus an array of Paragraphs.
  2. Display a list of the book titles, along with the number of paragraphs found in each book.
  3. Ask the user for a word to search for, and then display a list of the books that contain that word, along with the number of Paragraphs in that book that contain that word. (See program run example below)
  4. Repeat steps 2 and 3 until the user is done.
A paragraph, for the purposes of this project, is defined as a series of lines in a book what are contiguous. So a paragraph boundary is one (or more) blank line between other lines of code. This is the closest appoximation we can make to determine paragraphs. Some of the paragraphs will be quite big. There should never be an empty paragraph.
 

What to turn in

For the basic program turn in the following:

Line: 33 to 34
 

What to turn in

For the basic program turn in the following:

Deleted:
<
<
 
  1. All the code, fully documented
Changed:
<
<
  1. The output of runs with the following searches: Kenyon (should fail), doctor, box, love.
  2. For each search show the output for the number of matches. (Showing the actually matching paragraphs is considered extra credit, and addressed below)
For the extra credit you must turn in all of the following:
>
>
  1. The output of runs with the following searches: Kenyon (should fail), doctor, king, ship, love.
  2. Complete documentaiton for any extra credit work, as described below.

Extra Credit

You will have a opportunity to get extra credit with this assignment. Extra credit will will be points added on to your final course grade. Thus, if you have a final course grade of85%, and you earn 3% extra credit, your overall grade will become 88%.

 
Added:
>
>
For the extra credit you must turn in all of the following:
 
  1. A word or text document clearing describing, in a numbered list, all of the extra credit functions you have added.
Changed:
<
<
  1. A table showing the features and the expected extra credit. For example
    Feature Credit
    1. Search for words 1%
    3. Make search case insensitive 1%
    5. All viewing of matching paragraphs or sentances 1%
    Total 3%
>
>
  1. A table describing each the extra credit features added, and the expected extra credit for it. For example
    Feature Credit
    1. Option to view the actual paragraphs that match. 1%
    4. Made Word search case insensitive. 1%
    3. Highlight the matching words in Red 1%
    Total 3%
 
  1. At least one run for each feature clearly demonstrating it's operation.

Changed:
<
<

Extra credit

>
>

Extra credit Options

  Since this is the lass project you will have the opportunity to explore this problem, and add extra credit toward your overall grade. Following are a list of possible options, with a percent of how much it add to your OVERALL grade. You may propose additional improvements for extra credit by emailing me with a proposal, and I will decide if it can be approved, and how much it is worth. The maximum extra credit is 10%.
Changed:
<
<
Some options:
>
>
Some options:
 
Changed:
<
<
  1. (1%) Make search match only matching words e.g. a space or "(" before, and one of the following after: . " ' ? ! : ; ) -
  2. (1%) Highlight the matching words (bold or color)
>
>
  1. (1%) Make search match only match whole words e.g. a substring delineated by a newline, spaces or "(" before, and one of the following after: . " ' ? ! : ; ) - \n
  2. (1%) Option to view the paragraphs with the matching word for a selected book.
  3. (1%) Highlight the matching words (bold or color) in the above option.
 
  1. (1%) Make searches case insensitive (so searching for "king" matches "king", "King", and "KING", for example.
  2. (1%) Add an option to show the matching paragraphs from a selected book (shown in the example below).
Changed:
<
<
  1. (1%) Choose whether to see matching paragraph or just sentences.
  2. (1%) Add support for a second author or set of works. The second file must be at least 1Mb, and you will need to format it appropriately. You will have two programs, one for Shakespeare, and another for the new file.
>
>
  1. (1%) Choose whether to see whole matching paragraph or just the matching sentences.
  2. (1%) Add support for a second author or set of works. The second file must be at least 1Mb, and you will need to format it appropriately.
 
  1. (2%) Add support for 5 or more authors, and start with a menu listing the options, and allowing the user to select the works, then on to the other operations.
Changed:
<
<
  1. (1%) Add support to #7 to search ALL books.
  2. (2%) Add support to #1 to search for pairs of words, not necessarily adjacent.
  3. (1%) Add support to search for words within some specified numbers of word apart.
>
>
  1. (1%) Add support more two or more adjacent words, such as "Lady MacBeth " or "to be or not to be".
  2. (2%) Add support to search for two or more words, not necessarily adjacent, in the same paragraph. For example, find paragrpahs that incude the words "labour'st", "accommodations", and "Dreaming".
  3. (1%) Add support to search for words within some specified numbers of word apart. E.g. search for paragraphs with "accommodations", and "dreaming" with less then 3 words between (either order).
 
  1. (2%) Add Stemming (see instructor if you wish to try this)
  2. You propose your own!!

The Class definitions

Line: 68 to 72
  string text; public: paragraph();
Changed:
<
<
void setText(string p); bool search(string word); void display();
>
>
void setText(string p); // Put (or replace) the text in a paragraph bool search(string word); // Search this paragraph for this word. void display(); // Display this paragraph
 };

class book {

Line: 79 to 83
  vector paragraphs; public: book();
Changed:
<
<
void setTitle(string title); string getTitle(); int search(string word); void add(paragraph p); void clear(); int getParaCount(); void displayMatches(string search);
>
>
void setTitle(string title); // Set the title of this book string getTitle(); // Get the title int countMatches(string word); // Return the number if time word appears in a Book void add(paragraph p); // add a paragraph to the end of the book; void clear(); // Clear the contents and title of it hAME void displayMatches(string word); // Display all paragraphs with word in it
 };

%ENDCODE%

Line: 121 to 124
 } %ENDCODE%
Changed:
<
<
The program should have a vector of book.
>
>
The program should have a vector of book.
 

Processing

Line: 129 to 132
 

Run Example

Changed:
<
<
Welcome to the Shakespeare search program
Books (# of paragraphs)

>
>
Wellcome to the Shakespeare word lookup program
Number of books: 38
 1. THE SONNETS (155) 2. ALLS WELL THAT ENDS WELL (150) 3. THE TRAGEDY OF ANTONY AND CLEOPATRA (271)
Line: 169 to 171
 36. THE TWO GENTLEMEN OF VERONA (127) 37. THE WINTER'S TALE (127) 38. A LOVER'S COMPLAINT (48)
Changed:
<
<
Number of Books: 38

Word to search for:sail

>
>

Enter a word to search for:sail
 1. THE SONNETS has 5 matches. 2. ALLS WELL THAT ENDS WELL has 1 matches. 3. THE TRAGEDY OF ANTONY AND CLEOPATRA has 7 matches.
Line: 202 to 202
 34. THE HISTORY OF TROILUS AND CRESSIDA has 5 matches. 35. TWELFTH NIGHT; OR, WHAT YOU WILL has 5 matches. 38. A LOVER'S COMPLAINT has 1 matches.
Changed:
<
<
Enter book number to view matches, 0 for a new search, -1 to end: 29

Matches of "sail" in book " THE TRAGEDY OF ROMEO AND JULIET"

>
>
To display the paragraphs containing "sail" enter the number of the book, or 0 to search for another word: 28
 
Changed:
<
<
Ben. See, where he comes. So please you step aside, I'll know his grievance, or be much denied. Mon. I would thou wert so happy by thy stay To hear true shrift. Come, madam, let's away, Exeunt [Montague and Wife]. Ben. Good morrow, cousin. Rom. Is the day so young? Ben. But new struck nine. Rom. Ay me! sad hours seem long. Was that my father that went hence so fast? Ben. It was. What sadness lengthens Romeo's hours? Rom. Not having that which having makes them short. Ben. In love? Rom. Out- Ben. Of love? Rom. Out of her favour where I am in love. Ben. Alas that love, so gentle in his view, Should be so tyrannous and rough in proof! Rom. Alas that love, whose view is muffled still, Should without eyes see pathways to his will! Where shall we dine? O me! What fray was here? Yet tell me not, for I have heard it all. Here's much to do with hate, but more with love. Why then, O brawling love! O loving hate! O anything, of nothing first create! O heavy lightness! serious vanity! Misshapen chaos of well-seeming forms! Feather of lead, bright smoke, cold fire, sick health! Still-waking sleep, that is not what it is This love feel I, that feel no love in this. Dost thou not laugh? Ben. No, coz, I rather weep. Rom. Good heart, at what? Ben. At thy good heart's oppression. Rom. Why, such is love's transgression. Griefs of mine own lie heavy in my breast, Which thou wilt propagate, to have it prest With more of thine. This love that thou hast shown Doth add more grief to too much of mine own. Love is a smoke rais'd with the fume of sighs; Being purg'd, a fire sparkling in lovers' eyes; Being vex'd, a sea nourish'd with lovers' tears. What is it else? A madness most discreet, A choking gall, and a preserving sweet. Farewell, my coz. Ben. Soft! I will go along. An if you leave me so, you do me wrong. Rom. Tut! I have lost myself; I am not here: This is not Romeo, he's some other where. Ben. Tell me in sadness, who is that you love? Rom. What, shall I groan and tell thee? Ben. Groan? Why, no; But sadly tell me who. Rom. Bid a sick man in sadness make his will. Ah, word ill urg'd to one that is so ill! In sadness, cousin, I do love a woman. Ben. I aim'd so near when I suppos'd you lov'd. Rom. A right good markman! And she's fair I love. Ben. A right fair mark, fair coz, is soonest hit. Rom. Well, in that hit you miss. She'll not be hit With Cupid's arrow. She hath Dian's wit, And, in strong proof of chastity well arm'd, From Love's weak childish bow she lives unharm'd. She will not stay the siege of loving terms, Nor bide th' encounter of assailing eyes, Nor ope her lap to saint-seducing gold. O, she's rich in beauty; only poor That, when she dies, with beauty dies her store. Ben. Then she hath sworn that she will still live chaste? Rom. She hath, and in that sparing makes huge waste; For beauty, starv'd with her severity, Cuts beauty off from all posterity. She is too fair, too wise, wisely too fair, To merit bliss by making me despair. She hath forsworn to love, and in that vow Do I live dead that live to tell it now. Ben. Be rul'd by me: forget to think of her. Rom. O, teach me how I should forget to think! Ben. By giving liberty unto thine eyes. Examine other beauties. Rom. 'Tis the way To call hers (exquisite) in question more. These happy masks that kiss fair ladies' brows, Being black puts us in mind they hide the fair. He that is strucken blind cannot forget The precious treasure of his eyesight lost. Show me a mistress that is passing fair, What doth her beauty serve but as a note Where I may read who pass'd that passing fair? Farewell. Thou canst not teach me to forget. Ben. I'll pay that doctrine, or else die in debt. Exeunt.

Rom. What, shall this speech be spoke for our excuse? Or shall we on without apology? Ben. The date is out of such prolixity. We'll have no Cupid hoodwink'd with a scarf, Bearing a Tartar's painted bow of lath, Scaring the ladies like a crowkeeper; Nor no without-book prologue, faintly spoke After the prompter, for our entrance; But, let them measure us by what they will, We'll measure them a measure, and be gone. Rom. Give me a torch. I am not for this ambling. Being but heavy, I will bear the light. Mer. Nay, gentle Romeo, we must have you dance. Rom. Not I, believe me. You have dancing shoes With nimble soles; I have a soul of lead So stakes me to the ground I cannot move. Mer. You are a lover. Borrow Cupid's wings And soar with them above a common bound. Rom. I am too sore enpierced with his shaft To soar with his light feathers; and so bound I cannot bound a pitch above dull woe. Under love's heavy burthen do I sink. Mer. And, to sink in it, should you burthen love- Too great oppression for a tender thing. Rom. Is love a tender thing? It is too rough, Too rude, too boist'rous, and it pricks like thorn. Mer. If love be rough with you, be rough with love. Prick love for pricking, and you beat love down. Give me a case to put my visage in. A visor for a visor! What care I What curious eye doth quote deformities? Here are the beetle brows shall blush for me. Ben. Come, knock and enter; and no sooner in But every man betake him to his legs. Rom. A torch for me! Let wantons light of heart Tickle the senseless rushes with their heels; For I am proverb'd with a grandsire phrase, I'll be a candle-holder and look on; The game was ne'er so fair, and I am done. Mer. Tut! dun's the mouse, the constable's own word! If thou art Dun, we'll draw thee from the mire Of this sir-reverence love, wherein thou stick'st Up to the ears. Come, we burn daylight, ho! Rom. Nay, that's not so. Mer. I mean, sir, in delay We waste our lights in vain, like lamps by day. Take our good meaning, for our judgment sits Five times in that ere once in our five wits. Rom. And we mean well, in going to this masque; But 'tis no wit to go. Mer. Why, may one ask? Rom. I dreamt a dream to-night. Mer. And so did I. Rom. Well, what was yours? Mer. That dreamers often lie. Rom. In bed asleep, while they do dream things true. Mer. O, then I see Queen Mab hath been with you. She is the fairies' midwife, and she comes In shape no bigger than an agate stone On the forefinger of an alderman, Drawn with a team of little atomies Athwart men's noses as they lie asleep; Her wagon spokes made of long spinners' legs, The cover, of the wings of grasshoppers; Her traces, of the smallest spider's web; Her collars, of the moonshine's wat'ry beams; Her whip, of cricket's bone; the lash, of film; Her wagoner, a small grey-coated gnat, Not half so big as a round little worm Prick'd from the lazy finger of a maid; Her chariot is an empty hazelnut, Made by the joiner squirrel or old grub, Time out o' mind the fairies' coachmakers. And in this state she 'gallops night by night Through lovers' brains, and then they dream of love; O'er courtiers' knees, that dream on cursies straight; O'er lawyers' fingers, who straight dream on fees; O'er ladies' lips, who straight on kisses dream, Which oft the angry Mab with blisters plagues, Because their breaths with sweetmeats tainted are. Sometime she gallops o'er a courtier's nose, And then dreams he of smelling out a suit; And sometime comes she with a tithe-pig's tail Tickling a parson's nose as 'a lies asleep, Then dreams he of another benefice. Sometimes she driveth o'er a soldier's neck, And then dreams he of cutting foreign throats, Of breaches, ambuscadoes, Spanish blades, Of healths five fadom deep; and then anon Drums in his ear, at which he starts and wakes, And being thus frighted, swears a prayer or two And sleeps again. This is that very Mab That plats the manes of horses in the night And bakes the elflocks in foul sluttish, hairs, Which once untangled much misfortune bodes This is the hag, when maids lie on their backs, That presses them and learns them first to bear, Making them women of good carriage. This is she- Rom. Peace, peace, Mercutio, peace! Thou talk'st of nothing. Mer. True, I talk of dreams; Which are the children of an idle brain, Begot of nothing but vain fantasy; Which is as thin of substance as the air, And more inconstant than the wind, who wooes Even now the frozen bosom of the North And, being anger'd, puffs away from thence, Turning his face to the dew-dropping South. Ben. This wind you talk of blows us from ourselves. Supper is done, and we shall come too late. Rom. I fear, too early; for my mind misgives Some consequence, yet hanging in the stars, Shall bitterly begin his fearful date With this night's revels and expire the term Of a despised life, clos'd in my breast, By some vile forfeit of untimely death. But he that hath the steerage of my course Direct my sail! On, lusty gentlemen! Ben. Strike, drum. They march about the stage. [Exeunt.]

But soft! What light through yonder window breaks? It is the East, and Juliet is the sun! Arise, fair sun, and kill the envious moon, Who is already sick and pale with grief That thou her maid art far more fair than she. Be not her maid, since she is envious. Her vestal livery is but sick and green, And none but fools do wear it. Cast it off. It is my lady; O, it is my love! O that she knew she were! She speaks, yet she says nothing. What of that? Her eye discourses; I will answer it. I am too bold; 'tis not to me she speaks. Two of the fairest stars in all the heaven, Having some business, do entreat her eyes To twinkle in their spheres till they return. What if her eyes were there, they in her head? The brightness of her cheek would shame those stars As daylight doth a lamp; her eyes in heaven Would through the airy region stream so bright That birds would sing and think it were not night. See how she leans her cheek upon her hand! O that I were a glove upon that hand, That I might touch that cheek! Jul. Ay me! Rom. She speaks. O, speak again, bright angel! for thou art As glorious to this night, being o'er my head, As is a winged messenger of heaven Unto the white-upturned wond'ring eyes Of mortals that fall back to gaze on him When he bestrides the lazy-pacing clouds And sails upon the bosom of the air. Jul. O Romeo, Romeo! wherefore art thou Romeo? Deny thy father and refuse thy name! Or, if thou wilt not, be but sworn my love, And I'll no longer be a Capulet. Rom. [aside] Shall I hear more, or shall I speak at this? Jul. 'Tis but thy name that is my enemy. Thou art thyself, though not a Montague. What's Montague? it is nor hand, nor foot, Nor arm, nor face, nor any other part Belonging to a man. O, be some other name! What's in a name? That which we call a rose By any other name would smell as sweet. So Romeo would, were he not Romeo call'd, Retain that dear perfection which he owes Without that title. Romeo, doff thy name; And for that name, which is no part of thee, Take all myself. Rom. I take thee at thy word. Call me but love, and I'll be new baptiz'd; Henceforth I never will be Romeo. Jul. What man art thou that, thus bescreen'd in night, So stumblest on my counsel? Rom. By a name I know not how to tell thee who I am. My name, dear saint, is hateful to myself, Because it is an enemy to thee. Had I it written, I would tear the word. Jul. My ears have yet not drunk a hundred words Of that tongue's utterance, yet I know the sound. Art thou not Romeo, and a Montague? Rom. Neither, fair saint, if either thee dislike. Jul. How cam'st thou hither, tell me, and wherefore? The orchard walls are high and hard to climb, And the place death, considering who thou art, If any of my kinsmen find thee here. Rom. With love's light wings did I o'erperch these walls; For stony limits cannot hold love out, And what love can do, that dares love attempt. Therefore thy kinsmen are no let to me. Jul. If they do see thee, they will murther thee. Rom. Alack, there lies more peril in thine eye Than twenty of their swords! Look thou but sweet, And I am proof against their enmity. Jul. I would not for the world they saw thee here. Rom. I have night's cloak to hide me from their sight; And but thou love me, let them find me here. My life were better ended by their hate Than death prorogued, wanting of thy love. Jul. By whose direction found'st thou out this place? Rom. By love, that first did prompt me to enquire. He lent me counsel, and I lent him eyes. I am no pilot; yet, wert thou as far As that vast shore wash'd with the farthest sea, I would adventure for such merchandise. Jul. Thou knowest the mask of night is on my face; Else would a maiden blush bepaint my cheek For that which thou hast heard me speak to-night. Fain would I dwell on form- fain, fain deny What I have spoke; but farewell compliment! Dost thou love me, I know thou wilt say 'Ay'; And I will take thy word. Yet, if thou swear'st, Thou mayst prove false. At lovers' perjuries, They say Jove laughs. O gentle Romeo, If thou dost love, pronounce it faithfully. Or if thou thinkest I am too quickly won, I'll frown, and be perverse, and say thee nay, So thou wilt woo; but else, not for the world. In truth, fair Montague, I am too fond, And therefore thou mayst think my haviour light; But trust me, gentleman, I'll prove more true Than those that have more cunning to be strange. I should have been more strange, I must confess, But that thou overheard'st, ere I was ware, My true-love passion. Therefore pardon me, And not impute this yielding to light love, Which the dark night hath so discovered. Rom. Lady, by yonder blessed moon I swear, That tips with silver all these fruit-tree tops- Jul. O, swear not by the moon, th' inconstant moon, That monthly changes in her circled orb, Lest that thy love prove likewise variable. Rom. What shall I swear by? Jul. Do not swear at all; Or if thou wilt, swear by thy gracious self, Which is the god of my idolatry, And I'll believe thee. Rom. If my heart's dear love- Jul. Well, do not swear. Although I joy in thee, I have no joy of this contract to-night. It is too rash, too unadvis'd, too sudden; Too like the lightning, which doth cease to be Ere one can say 'It lightens.' Sweet, good night! This bud of love, by summer's ripening breath, May prove a beauteous flow'r when next we meet. Good night, good night! As sweet repose and rest Come to thy heart as that within my breast! Rom. O, wilt thou leave me so unsatisfied? Jul. What satisfaction canst thou have to-night? Rom. Th' exchange of thy love's faithful vow for mine. Jul. I gave thee mine before thou didst request it; And yet I would it were to give again. Rom. Would'st thou withdraw it? For what purpose, love? Jul. But to be frank and give it thee again. And yet I wish but for the thing I have. My bounty is as boundless as the sea, My love as deep; the more I give to thee, The more I have, for both are infinite. I hear some noise within. Dear love, adieu! [Nurse] calls within. Anon, good nurse! Sweet Montague, be true. Stay but a little, I will come again. [Exit.] Rom. O blessed, blessed night! I am afeard, Being in night, all this is but a dream, Too flattering-sweet to be substantial.

Mer. A sail, a sail! Ben. Two, two! a shirt and a smock. Nurse. Peter! Peter. Anon. Nurse. My fan, Peter. Mer. Good Peter, to hide her face; for her fan's the fairer face of the two. Nurse. God ye good morrow, gentlemen. Mer. God ye good-den, fair gentlewoman. Nurse. Is it good-den? Mer. 'Tis no less, I tell ye; for the bawdy hand of the dial is now upon the prick of noon. Nurse. Out upon you! What a man are you! Rom. One, gentlewoman, that God hath made for himself to mar. Nurse. By my troth, it is well said. 'For himself to mar,' quoth 'a? Gentlemen, can any of you tell me where I may find the young Romeo? Rom. I can tell you; but young Romeo will be older when you have found him than he was when you sought him. I am the youngest of that name, for fault of a worse. Nurse. You say well. Mer. Yea, is the worst well? Very well took, i' faith! wisely, wisely. Nurse. If you be he, sir, I desire some confidence with you. Ben. She will endite him to some supper. Mer. A bawd, a bawd, a bawd! So ho! Rom. What hast thou found? Mer. No hare, sir; unless a hare, sir, in a lenten pie, that is something stale and hoar ere it be spent He walks by them and sings.

>
>
Paragraphs from KING RICHARD III containing the word sail GLOUCESTER. I pray you all, tell me what they deserve That do conspire my death with devilish plots Of damned witchcraft, and that have prevail'd Upon my body with their hellish charms? HASTINGS. The tender love I bear your Grace, my lord, Makes me most forward in this princely presence To doom th' offenders, whosoe'er they be. I say, my lord, they have deserved death. GLOUCESTER. Then be your eyes the witness of their evil. Look how I am bewitch'd; behold, mine arm Is like a blasted sapling wither'd up. And this is Edward's wife, that monstrous witch, Consorted with that harlot strumpet Shore, That by their witchcraft thus have marked me. HASTINGS. If they have done this deed, my noble lord- GLOUCESTER. If?-thou protector of this damned strumpet, Talk'st thou to me of ifs? Thou art a traitor. Off with his head! Now by Saint Paul I swear I will not dine until I see the same. Lovel and Ratcliff, look that it be done. The rest that love me, rise and follow me. Exeunt all but HASTINGS, LOVEL, and RATCLIFF HASTINGS. Woe, woe, for England! not a whit for me; For I, too fond, might have prevented this. STANLEY did dream the boar did raze our helms, And I did scorn it and disdain to fly. Three times to-day my foot-cloth horse did stumble, And started when he look'd upon the Tower, As loath to bear me to the slaughter-house. O, now I need the priest that spake to me! I now repent I told the pursuivant, As too triumphing, how mine enemies To-day at Pomfret bloodily were butcher'd, And I myself secure in grace and favour. O Margaret, Margaret, now thy heavy curse Is lighted on poor Hastings' wretched head! RATCLIFF. Come, come, dispatch; the Duke would be at dinner. Make a short shrift; he longs to see your head. HASTINGS. O momentary grace of mortal men, Which we more hunt for than the grace of God! Who builds his hope in air of your good looks Lives like a drunken sailor on a mast, Ready with every nod to tumble down Into the fatal bowels of the deep. LOVEL. Come, come, dispatch; 'tis bootless to exclaim. HASTINGS. O bloody Richard! Miserable England! I prophesy the fearfull'st time to thee That ever wretched age hath look'd upon. Come, lead me to the block; bear him my head. They smile at me who shortly shall be dead. Exeunt
KING RICHARD. Who intercepts me in my expedition? DUCHESS. O, she that might have intercepted thee, By strangling thee in her accursed womb, From all the slaughters, wretch, that thou hast done! QUEEN ELIZABETH. Hidest thou that forehead with a golden crown Where't should be branded, if that right were right, The slaughter of the Prince that ow'd that crown, And the dire death of my poor sons and brothers? Tell me, thou villain slave, where are my children? DUCHESS. Thou toad, thou toad, where is thy brother Clarence? And little Ned Plantagenet, his son? QUEEN ELIZABETH. Where is the gentle Rivers, Vaughan, Grey? DUCHESS. Where is kind Hastings? KING RICHARD. A flourish, trumpets! Strike alarum, drums! Let not the heavens hear these tell-tale women Rail on the Lord's anointed. Strike, I say! [Flourish. Alarums] Either be patient and entreat me fair, Or with the clamorous report of war Thus will I drown your exclamations. DUCHESS. Art thou my son? KING RICHARD. Ay, I thank God, my father, and yourself. DUCHESS. Then patiently hear my impatience. KING RICHARD. Madam, I have a touch of your condition That cannot brook the accent of reproof. DUCHESS. O, let me speak! KING RICHARD. Do, then; but I'll not hear. DUCHESS. I will be mild and gentle in my words. KING RICHARD. And brief, good mother; for I am in haste. DUCHESS. Art thou so hasty? I have stay'd for thee, God knows, in torment and in agony. KING RICHARD. And came I not at last to comfort you? DUCHESS. No, by the holy rood, thou know'st it well Thou cam'st on earth to make the earth my hell. A grievous burden was thy birth to me; Tetchy and wayward was thy infancy; Thy school-days frightful, desp'rate, wild, and furious; Thy prime of manhood daring, bold, and venturous; Thy age confirm'd, proud, subtle, sly, and bloody, More mild, but yet more harmful-kind in hatred. What comfortable hour canst thou name That ever grac'd me with thy company? KING RICHARD. Faith, none but Humphrey Hour, that call'd your Grace To breakfast once forth of my company. If I be so disgracious in your eye, Let me march on and not offend you, madam. Strike up the drum. DUCHESS. I prithee hear me speak. KING RICHARD. You speak too bitterly. DUCHESS. Hear me a word; For I shall never speak to thee again. KING RICHARD. So. DUCHESS. Either thou wilt die by God's just ordinance Ere from this war thou turn a conqueror; Or I with grief and extreme age shall perish And never more behold thy face again. Therefore take with thee my most grievous curse, Which in the day of battle tire thee more Than all the complete armour that thou wear'st! My prayers on the adverse party fight; And there the little souls of Edward's children Whisper the spirits of thine enemies And promise them success and victory. Bloody thou art; bloody will be thy end. Shame serves thy life and doth thy death attend. Exit QUEEN ELIZABETH. Though far more cause, yet much less spirit to curse Abides in me; I say amen to her. KING RICHARD. Stay, madam, I must talk a word with you. QUEEN ELIZABETH. I have no moe sons of the royal blood For thee to slaughter. For my daughters, Richard, They shall be praying nuns, not weeping queens; And therefore level not to hit their lives. KING RICHARD. You have a daughter call'd Elizabeth. Virtuous and fair, royal and gracious. QUEEN ELIZABETH. And must she die for this? O, let her live, And I'll corrupt her manners, stain her beauty, Slander myself as false to Edward's bed, Throw over her the veil of infamy; So she may live unscarr'd of bleeding slaughter, I will confess she was not Edward's daughter. KING RICHARD. Wrong not her birth; she is a royal Princess. QUEEN ELIZABETH. To save her life I'll say she is not so. KING RICHARD. Her life is safest only in her birth. QUEEN ELIZABETH. And only in that safety died her brothers. KING RICHARD. Lo, at their birth good stars were opposite. QUEEN ELIZABETH. No, to their lives ill friends were contrary. KING RICHARD. All unavoided is the doom of destiny. QUEEN ELIZABETH. True, when avoided grace makes destiny. My babes were destin'd to a fairer death, If grace had bless'd thee with a fairer life. KING RICHARD. You speak as if that I had slain my cousins. QUEEN ELIZABETH. Cousins, indeed; and by their uncle cozen'd Of comfort, kingdom, kindred, freedom, life. Whose hand soever lanc'd their tender hearts, Thy head, an indirectly, gave direction. No doubt the murd'rous knife was dull and blunt Till it was whetted on thy stone-hard heart To revel in the entrails of my lambs. But that stiff use of grief makes wild grief tame, My tongue should to thy ears not name my boys Till that my nails were anchor'd in thine eyes; And I, in such a desp'rate bay of death, Like a poor bark, of sails and tackling reft, Rush all to pieces on thy rocky bosom. KING RICHARD. Madam, so thrive I in my enterprise And dangerous success of bloody wars, As I intend more good to you and yours Than ever you or yours by me were harm'd! QUEEN ELIZABETH. What good is cover'd with the face of heaven, To be discover'd, that can do me good? KING RICHARD. advancement of your children, gentle lady. QUEEN ELIZABETH. Up to some scaffold, there to lose their heads? KING RICHARD. Unto the dignity and height of Fortune, The high imperial type of this earth's glory. QUEEN ELIZABETH. Flatter my sorrow with report of it; Tell me what state, what dignity, what honour, Canst thou demise to any child of mine? KING RICHARD. Even all I have-ay, and myself and all Will I withal endow a child of thine; So in the Lethe of thy angry soul Thou drown the sad remembrance of those wrongs Which thou supposest I have done to thee. QUEEN ELIZABETH. Be brief, lest that the process of thy kindness Last longer telling than thy kindness' date. KING RICHARD. Then know, that from my soul I love thy daughter. QUEEN ELIZABETH. My daughter's mother thinks it with her soul. KING RICHARD. What do you think? QUEEN ELIZABETH. That thou dost love my daughter from thy soul. So from thy soul's love didst thou love her brothers, And from my heart's love I do thank thee for it. KING RICHARD. Be not so hasty to confound my meaning. I mean that with my soul I love thy daughter And do intend to make her Queen of England. QUEEN ELIZABETH. Well, then, who dost thou mean shall be her king? KING RICHARD. Even he that makes her Queen. Who else should be? QUEEN ELIZABETH. What, thou? KING RICHARD. Even so. How think you of it? QUEEN ELIZABETH. How canst thou woo her? KING RICHARD. That would I learn of you, As one being best acquainted with her humour. QUEEN ELIZABETH. And wilt thou learn of me? KING RICHARD. Madam, with all my heart. QUEEN ELIZABETH. Send to her, by the man that slew her brothers, A pair of bleeding hearts; thereon engrave 'Edward' and 'York.' Then haply will she weep; Therefore present to her-as sometimes Margaret Did to thy father, steep'd in Rutland's blood- A handkerchief; which, say to her, did drain The purple sap from her sweet brother's body, And bid her wipe her weeping eyes withal. If this inducement move her not to love, Send her a letter of thy noble deeds; Tell her thou mad'st away her uncle Clarence, Her uncle Rivers; ay, and for her sake Mad'st quick conveyance with her good aunt Anne. KING RICHARD. You mock me, madam; this is not the way To win your daughter. QUEEN ELIZABETH. There is no other way; Unless thou couldst put on some other shape And not be Richard that hath done all this. KING RICHARD. Say that I did all this for love of her. QUEEN ELIZABETH. Nay, then indeed she cannot choose but hate thee, Having bought love with such a bloody spoil. KING RICHARD. Look what is done cannot be now amended. Men shall deal unadvisedly sometimes, Which after-hours gives leisure to repent. If I did take the kingdom from your sons, To make amends I'll give it to your daughter. If I have kill'd the issue of your womb, To quicken your increase I will beget Mine issue of your blood upon your daughter. A grandam's name is little less in love Than is the doating title of a mother; They are as children but one step below, Even of your metal, of your very blood; Of all one pain, save for a night of groans Endur'd of her, for whom you bid like sorrow. Your children were vexation to your youth; But mine shall be a comfort to your age. The loss you have is but a son being King, And by that loss your daughter is made Queen. I cannot make you what amends I would, Therefore accept such kindness as I can. Dorset your son, that with a fearful soul Leads discontented steps in foreign soil, This fair alliance quickly shall can home To high promotions and great dignity. The King, that calls your beauteous daughter wife, Familiarly shall call thy Dorset brother; Again shall you be mother to a king, And all the ruins of distressful times Repair'd with double riches of content. What! we have many goodly days to see. The liquid drops of tears that you have shed Shall come again, transform'd to orient pearl, Advantaging their loan with interest Of ten times double gain of happiness. Go, then, my mother, to thy daughter go; Make bold her bashful years with your experience; Prepare her ears to hear a wooer's tale; Put in her tender heart th' aspiring flame Of golden sovereignty; acquaint the Princes With the sweet silent hours of marriage joys. And when this arm of mine hath chastised The petty rebel, dull-brain'd Buckingham, Bound with triumphant garlands will I come, And lead thy daughter to a conqueror's bed; To whom I will retail my conquest won, And she shall be sole victoress, Caesar's Caesar. QUEEN ELIZABETH. What were I best to say? Her father's brother Would be her lord? Or shall I say her uncle? Or he that slew her brothers and her uncles? Under what title shall I woo for thee That God, the law, my honour, and her love Can make seem pleasing to her tender years? KING RICHARD. Infer fair England's peace by this alliance. QUEEN ELIZABETH. Which she shall purchase with still-lasting war. KING RICHARD. Tell her the King, that may command, entreats. QUEEN ELIZABETH. That at her hands which the King's King forbids. KING RICHARD. Say she shall be a high and mighty queen. QUEEN ELIZABETH. To wail the title, as her mother doth. KING RICHARD. Say I will love her everlastingly. QUEEN ELIZABETH. But how long shall that title 'ever' last? KING RICHARD. Sweetly in force unto her fair life's end. QUEEN ELIZABETH. But how long fairly shall her sweet life last? KING RICHARD. As long as heaven and nature lengthens it. QUEEN ELIZABETH. As long as hell and Richard likes of it. KING RICHARD. Say I, her sovereign, am her subject low. QUEEN ELIZABETH. But she, your subject, loathes such sovereignty. KING RICHARD. Be eloquent in my behalf to her. QUEEN ELIZABETH. An honest tale speeds best being plainly told. KING RICHARD. Then plainly to her tell my loving tale. QUEEN ELIZABETH. Plain and not honest is too harsh a style. KING RICHARD. Your reasons are too shallow and too quick. QUEEN ELIZABETH. O, no, my reasons are too deep and dead- Too deep and dead, poor infants, in their graves. KING RICHARD. Harp not on that string, madam; that is past. QUEEN ELIZABETH. Harp on it still shall I till heartstrings break. KING RICHARD. Now, by my George, my garter, and my crown- QUEEN ELIZABETH. Profan'd, dishonour'd, and the third usurp'd. KING RICHARD. I swear- QUEEN ELIZABETH. By nothing; for this is no oath: Thy George, profan'd, hath lost his lordly honour; Thy garter, blemish'd, pawn'd his knightly virtue; Thy crown, usurp'd, disgrac'd his kingly glory. If something thou wouldst swear to be believ'd, Swear then by something that thou hast not wrong'd. KING RICHARD. Then, by my self- QUEEN ELIZABETH. Thy self is self-misus'd. KING RICHARD. Now, by the world- QUEEN ELIZABETH. 'Tis full of thy foul wrongs. KING RICHARD. My father's death- QUEEN ELIZABETH. Thy life hath it dishonour'd. KING RICHARD. Why, then, by God- QUEEN ELIZABETH. God's wrong is most of all. If thou didst fear to break an oath with Him, The unity the King my husband made Thou hadst not broken, nor my brothers died. If thou hadst fear'd to break an oath by Him, Th' imperial metal, circling now thy head, Had grac'd the tender temples of my child; And both the Princes had been breathing here, Which now, two tender bedfellows for dust, Thy broken faith hath made the prey for worms. What canst thou swear by now? KING RICHARD. The time to come. QUEEN ELIZABETH. That thou hast wronged in the time o'erpast; For I myself have many tears to wash Hereafter time, for time past wrong'd by thee. The children live whose fathers thou hast slaughter'd, Ungovern'd youth, to wail it in their age; The parents live whose children thou hast butcheed, Old barren plants, to wail it with their age. Swear not by time to come; for that thou hast Misus'd ere us'd, by times ill-us'd o'erpast. KING RICHARD. As I intend to prosper and repent, So thrive I in my dangerous affairs Of hostile arms! Myself myself confound! Heaven and fortune bar me happy hours! Day, yield me not thy light; nor, night, thy rest! Be opposite all planets of good luck To my proceeding!-if, with dear heart's love, Immaculate devotion, holy thoughts, I tender not thy beauteous princely daughter. In her consists my happiness and thine; Without her, follows to myself and thee, Herself, the land, and many a Christian soul, Death, desolation, ruin, and decay. It cannot be avoided but by this; It will not be avoided but by this. Therefore, dear mother-I must call you so- Be the attorney of my love to her; Plead what I will be, not what I have been; Not my deserts, but what I will deserve. Urge the necessity and state of times, And be not peevish-fond in great designs. QUEEN ELIZABETH. Shall I be tempted of the devil thus? KING RICHARD. Ay, if the devil tempt you to do good. QUEEN ELIZABETH. Shall I forget myself to be myself? KING RICHARD. Ay, if your self's remembrance wrong yourself. QUEEN ELIZABETH. Yet thou didst kill my children. KING RICHARD. But in your daughter's womb I bury them; Where, in that nest of spicery, they will breed Selves of themselves, to your recomforture. QUEEN ELIZABETH. Shall I go win my daughter to thy will? KING RICHARD. And be a happy mother by the deed. QUEEN ELIZABETH. I go. Write to me very shortly, And you shall understand from me her mind. KING RICHARD. Bear her my true love's kiss; and so, farewell. Kissing her. Exit QUEEN ELIZABETH Relenting fool, and shallow, changing woman!
FOURTH MESSENGER. Sir Thomas Lovel and Lord Marquis Dorset, 'Tis said, my liege, in Yorkshire are in arms. But this good comfort bring I to your Highness- The Britaine navy is dispers'd by tempest. Richmond in Dorsetshire sent out a boat Unto the shore, to ask those on the banks If they were his assistants, yea or no; Who answer'd him they came from Buckingham Upon his party. He, mistrusting them, Hois'd sail, and made his course again for Britaine. KING RICHARD. March on, march on, since we are up in arms; If not to fight with foreign enemies, Yet to beat down these rebels here at home.
 
Changed:
<
<
Enter book number to view matches, 0 for a new search, -1 to end:
>
>
To display the paragraphs containing "sail" enter the number of the book, or 0 to search for another word:
 

Revision 192016-11-08 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project - Shakespeare

Line: 607 to 607
 
  • BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg:

META FILEATTACHMENT attachment="Shakespeare.txt" attr="" comment="" date="1449757531" name="Shakespeare.txt" path="Shakespeare.txt" size="5465289" user="JimSkon" version="2"
Changed:
<
<
META FILEATTACHMENT attachment="C_-_shakespeare.png" attr="" comment="" date="1449108089" name="C_-_shakespeare.png" path="C_-_shakespeare.png" size="19227" user="JimSkon" version="1"
>
>
META FILEATTACHMENT attachment="C_-_shakespeare.png" attr="" comment="" date="1478583816" name="C_-_shakespeare.png" path="C_-_shakespeare.png" size="19227" user="JimSkon" version="1"
 
META FILEATTACHMENT attachment="BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg" attr="" comment="" date="1475358444" name="BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg" path="BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg" size="73395" user="JimSkon" version="1"

Revision 182016-10-01 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Changed:
<
<

Final Project

Due: Dec 12, 11:55pm (No late submissions allowed)

>
>

Final Project - Shakespeare

Due: Dec 12, 11:55pm

(No late submissions allowed)
BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg

 

Instructions

  • Turn in the code (a cpp file or ideone.com link), and the run outputs as requested below.
  • Remember to format the code as described and the book and text, and to include comments including complete commetns at the beginning of the program.
Line: 599 to 603
 
Changed:
<
<
>
>
  • Shakespeare.txt: Shakespeare.txt

  • BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg:
 
META FILEATTACHMENT attachment="Shakespeare.txt" attr="" comment="" date="1449757531" name="Shakespeare.txt" path="Shakespeare.txt" size="5465289" user="JimSkon" version="2"
META FILEATTACHMENT attachment="C_-_shakespeare.png" attr="" comment="" date="1449108089" name="C_-_shakespeare.png" path="C_-_shakespeare.png" size="19227" user="JimSkon" version="1"
Added:
>
>
META FILEATTACHMENT attachment="BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg" attr="" comment="" date="1475358444" name="BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg" path="BIO_Mini-Bios_William-Shakespeare_SF_HD_768x432-16x9.jpg" size="73395" user="JimSkon" version="1"

Revision 172016-08-24 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project

Changed:
<
<

Due: Dec 16, 11:55pm

>
>

Due: Dec 12, 11:55pm (No late submissions allowed)

 

Instructions

  • Turn in the code (a cpp file or ideone.com link), and the run outputs as requested below.
  • Remember to format the code as described and the book and text, and to include comments including complete commetns at the beginning of the program.
Line: 37 to 37
 
  1. A word or text document clearing describing, in a numbered list, all of the extra credit functions you have added.
  2. A table showing the features and the expected extra credit. For example
    Feature Credit
    1. Search for words 1%
    3. Make search case insensitive 1%
    5. All viewing of matching paragraphs or sentances 1%
    Total 3%
Changed:
<
<
  1. At least one run for each feature clearly demonstrating it's operation.
>
>
  1. At least one run for each feature clearly demonstrating it's operation.

 

Extra credit

Since this is the lass project you will have the opportunity to explore this problem, and add extra credit toward your overall grade. Following are a list of possible options, with a percent of how much it add to your OVERALL grade. You may propose additional improvements for extra credit by emailing me with a proposal, and I will decide if it can be approved, and how much it is worth. The maximum extra credit is 10%.

Line: 122 to 121
 

Processing

Changed:
<
<

C_-_shakespeare.png
>
>

C_-_shakespeare.png
 

Run Example

Added:
>
>
 
Welcome to the Shakespeare search program
Books (# of paragraphs)
1.  THE SONNETS (155)

Revision 162015-12-17 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project

Due: Dec 16, 11:55pm

Line: 57 to 57
 
  1. (1%) Add support to search for words within some specified numbers of word apart.
  2. (2%) Add Stemming (see instructor if you wish to try this)
  3. You propose your own!!
Changed:
<
<

The Class Definitations

>
>

The Class definitions

  %CODE{"c++"}% class paragraph {

Revision 152015-12-17 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project

Due: Dec 16, 11:55pm

Line: 31 to 31
 For the basic program turn in the following:

  1. All the code, fully documented
Changed:
<
<
  1. A run with the following searches: Kenyon (should fail), doctor, box, love.
  2. For each search show the output for the number of matches. (Showing the actualy matching paragraphs is considered extra credit, and addressed below)
>
>
  1. The output of runs with the following searches: Kenyon (should fail), doctor, box, love.
  2. For each search show the output for the number of matches. (Showing the actually matching paragraphs is considered extra credit, and addressed below)
 For the extra credit you must turn in all of the following:

  1. A word or text document clearing describing, in a numbered list, all of the extra credit functions you have added.
Changed:
<
<
  1. A table showing the features and the expected extra credit. Example
    Feature Credit
    1. Search for words 1%
    3. Make search case insensitive 1%
    5. All viewing of matching paragraphs or sentances 1%
    Total 3%
>
>
  1. A table showing the features and the expected extra credit. For example
    Feature Credit
    1. Search for words 1%
    3. Make search case insensitive 1%
    5. All viewing of matching paragraphs or sentances 1%
    Total 3%
 
  1. At least one run for each feature clearly demonstrating it's operation.

Extra credit

Revision 142015-12-14 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project

Due: Dec 16, 11:55pm

Line: 32 to 32
 
  1. All the code, fully documented
  2. A run with the following searches: Kenyon (should fail), doctor, box, love.
Changed:
<
<
  1. For each search show all the output.
>
>
  1. For each search show the output for the number of matches. (Showing the actualy matching paragraphs is considered extra credit, and addressed below)
 For the extra credit you must turn in all of the following:

  1. A word or text document clearing describing, in a numbered list, all of the extra credit functions you have added.
Line: 122 to 122
 

Processing

Changed:
<
<

C_-_shakespeare.png
>
>

C_-_shakespeare.png
 

Run Example

Welcome to the Shakespeare search program

Revision 132015-12-14 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project

Due: Dec 16, 11:55pm

Line: 20 to 20
  A complete version of all works of Shakespeare in a single file is available here: Shakespeare.txt.
Changed:
<
<
Your program must do at least the following:
>
>
Your program must do at least the following:
 
  1. Read in the entire file of Shakespeare books, and parse it into Books and Paragraphs, where Books is object the contains an entire book (definition below), and Paragraph is an object representation of a paragraph (also below). Thus there will be an array of Books, and each book will be a title plus an array of paragraphs.
  2. Show the user a list of the book titles, alone with the number of paragraphs found in each.
  3. Ask the user for a word to search, and show the users how many paragraphs in each book has a match for this word.
  4. Repeat the above step until the user is done.
Added:
>
>

What to turn in

For the basic program turn in the following:

  1. All the code, fully documented
  2. A run with the following searches: Kenyon (should fail), doctor, box, love.
  3. For each search show all the output.
For the extra credit you must turn in all of the following:

  1. A word or text document clearing describing, in a numbered list, all of the extra credit functions you have added.
  2. A table showing the features and the expected extra credit. Example
    Feature Credit
    1. Search for words 1%
    3. Make search case insensitive 1%
    5. All viewing of matching paragraphs or sentances 1%
    Total 3%
  3. At least one run for each feature clearly demonstrating it's operation.
 

Extra credit

Changed:
<
<
Since this is the lass project you will have the opportunity to explore this problem, and add extra credit toward your overall grade. Following are a list of possible options, with a percent of how much it add to your OVERALL grade. You may propose additional improvements for extra credit by emailing me with a proposal, and I will decide if it can be approved, and how much it is worth. The maximum extra credit is 10%.
>
>
Since this is the lass project you will have the opportunity to explore this problem, and add extra credit toward your overall grade. Following are a list of possible options, with a percent of how much it add to your OVERALL grade. You may propose additional improvements for extra credit by emailing me with a proposal, and I will decide if it can be approved, and how much it is worth. The maximum extra credit is 10%.
  Some options:
Changed:
<
<
  1. (0.5%) Highlight the matching words (bold or color)
>
>
  1. (1%) Make search match only matching words e.g. a space or "(" before, and one of the following after: . " ' ? ! : ; ) -
  2. (1%) Highlight the matching words (bold or color)
 
  1. (1%) Make searches case insensitive (so searching for "king" matches "king", "King", and "KING", for example.
  2. (1%) Add an option to show the matching paragraphs from a selected book (shown in the example below).
  3. (1%) Choose whether to see matching paragraph or just sentences.
  4. (1%) Add support for a second author or set of works. The second file must be at least 1Mb, and you will need to format it appropriately. You will have two programs, one for Shakespeare, and another for the new file.
Changed:
<
<
  1. (2%) Add support for 5 or more authors, and start with a menu listing the options, and allowing the user to select the works, then to the other operations. This option is mutually exclusive with #2.
  2. (1%) Add support to #3 to search ALL books.
  3. (2%) Add support to #1 & #2 to search for pairs of words, not necessarily adjacent.
  4. (1%) Add support to #5 to search for words within some specified numbers of word apart.
  5. (2%) Add Stemming.
  6. More to come ...
>
>
  1. (2%) Add support for 5 or more authors, and start with a menu listing the options, and allowing the user to select the works, then on to the other operations.
  2. (1%) Add support to #7 to search ALL books.
  3. (2%) Add support to #1 to search for pairs of words, not necessarily adjacent.
  4. (1%) Add support to search for words within some specified numbers of word apart.
  5. (2%) Add Stemming (see instructor if you wish to try this)
  6. You propose your own!!
 

The Class Definitations

%CODE{"c++"}%
Line: 108 to 122
 

Processing

Changed:
<
<

C_-_shakespeare.png
>
>

C_-_shakespeare.png
 

Run Example

Welcome to the Shakespeare search program

Revision 122015-12-11 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project

Changed:
<
<

Due: Dec 14, 11:55pm

>
>

Due: Dec 16, 11:55pm

 

Instructions

  • Turn in the code (a cpp file or ideone.com link), and the run outputs as requested below.
  • Remember to format the code as described and the book and text, and to include comments including complete commetns at the beginning of the program.
Line: 108 to 108
 

Processing

Changed:
<
<

C_-_shakespeare.png
>
>

C_-_shakespeare.png
 

Run Example

Welcome to the Shakespeare search program

Revision 112015-12-11 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project

Due: Dec 14, 11:55pm

Line: 75 to 75
  %CODE{"c++"}%
Changed:
<
<
tring readParagraph( istream& is )
>
>
string readParagraph( istream& is )
 { string line; string paragraph; int lineNum = 0;;
Changed:
<
<
do {
>
>
//scan for the next paragraph do {
  getline( is , line );
Changed:
<
<
if (line.length() > 2 && lineNum++ > 0) {
>
>
} while (line.length() == 0 && is.eof());

// return nothing if eof if (is.eof()) { return ""; } // Get the next paragraph do { // Only put a newline after first line if (lineNum++ > 0) {

  paragraph += "\n"; } paragraph += line;
Changed:
<
<
} while( line.length() > 2 && is.fail());
>
>
getline(is, line); } while (line.length() > 0 && is.eof());
  return paragraph; }
Line: 100 to 108
 

Processing

Changed:
<
<

C_-_shakespeare.png
>
>

C_-_shakespeare.png
 

Run Example

Welcome to the Shakespeare search program
Books (# of paragraphs)

Changed:
<
<
1. THE SONNETS (311) 2. ALLS WELL THAT ENDS WELL (233) 3. THE TRAGEDY OF ANTONY AND CLEOPATRA (313) 4. AS YOU LIKE IT (243) 5. THE COMEDY OF ERRORS (149) 6. THE TRAGEDY OF CORIOLANUS (331) 7. CYMBELINE (290) 8. THE TRAGEDY OF HAMLET, PRINCE OF DENMARK (313) 9. THE FIRST PART OF KING HENRY THE FOURTH (237) 10. SECOND PART OF KING HENRY IV (259) 11. THE LIFE OF KING HENRY THE FIFTH (279) 12. THE FIRST PART OF HENRY THE SIXTH (312) 13. THE SECOND PART OF KING HENRY THE SIXTH (287) 14. THE THIRD PART OF KING HENRY THE SIXTH (285) 15. KING HENRY THE EIGHTH (233) 16. KING JOHN (198) 17. THE TRAGEDY OF JULIUS CAESAR (211) 18. THE TRAGEDY OF KING LEAR (310) 19. LOVE'S LABOUR'S LOST (144) 20. THE TRAGEDY OF MACBETH (506) 21. THE MERCHANT OF VENICE (203) 22. THE MERRY WIVES OF WINDSOR (308) 23. A MIDSUMMER NIGHT'S DREAM (172) 24. MUCH ADO ABOUT NOTHING (197) 25. THE TRAGEDY OF OTHELLO, MOOR OF VENICE (223) 26. KING RICHARD THE SECOND (212) 27. KING RICHARD III (344) 28. THE TRAGEDY OF ROMEO AND JULIET (294) 29. THE TAMING OF THE SHREW (213) 30. THE TEMPEST (165) 31. THE LIFE OF TIMON OF ATHENS (226) 32. THE TRAGEDY OF TITUS ANDRONICUS (195) 33. THE HISTORY OF TROILUS AND CRESSIDA (306) 34. TWELFTH NIGHT; OR, WHAT YOU WILL (245) 35. THE TWO GENTLEMEN OF VERONA (200) 36. THE WINTER'S TALE (184) 37. A LOVER'S COMPLAINT (50) Number of Books: 37
>
>
1. THE SONNETS (155) 2. ALLS WELL THAT ENDS WELL (150) 3. THE TRAGEDY OF ANTONY AND CLEOPATRA (271) 4. AS YOU LIKE IT (165) 5. THE COMEDY OF ERRORS (111) 6. THE TRAGEDY OF CORIOLANUS (231) 7. CYMBELINE (197) 8. THE TRAGEDY OF HAMLET, PRINCE OF DENMARK (234) 9. THE FIRST PART OF KING HENRY THE FOURTH (166) 10. SECOND PART OF KING HENRY IV (189) 11. THE LIFE OF KING HENRY THE FIFTH (183) 12. THE FIRST PART OF HENRY THE SIXTH (220) 13. THE SECOND PART OF KING HENRY THE SIXTH (201) 14. THE THIRD PART OF KING HENRY THE SIXTH (187) 15. KING HENRY THE EIGHTH (170) 16. KING JOHN (136) 17. THE TRAGEDY OF JULIUS CAESAR (143) 18. THE TRAGEDY OF KING LEAR (220) 19. LOVE'S LABOUR'S LOST (103) 20. THE TRAGEDY OF MACBETH (189) 21. MEASURE FOR MEASURE (146) 22. THE MERCHANT OF VENICE (133) 23. THE MERRY WIVES OF WINDSOR (220) 24. A MIDSUMMER NIGHT'S DREAM (132) 25. MUCH ADO ABOUT NOTHING (132) 26. THE TRAGEDY OF OTHELLO, MOOR OF VENICE (165) 27. KING RICHARD THE SECOND (142) 28. KING RICHARD III (256) 29. THE TRAGEDY OF ROMEO AND JULIET (205) 30. THE TAMING OF THE SHREW (165) 31. THE TEMPEST (122) 32. THE LIFE OF TIMON OF ATHENS (162) 33. THE TRAGEDY OF TITUS ANDRONICUS (140) 34. THE HISTORY OF TROILUS AND CRESSIDA (223) 35. TWELFTH NIGHT; OR, WHAT YOU WILL (177) 36. THE TWO GENTLEMEN OF VERONA (127) 37. THE WINTER'S TALE (127) 38. A LOVER'S COMPLAINT (48) Number of Books: 38
  Word to search for:sail 1. THE SONNETS has 5 matches.
Line: 162 to 171
 17. THE TRAGEDY OF JULIUS CAESAR has 1 matches. 19. LOVE'S LABOUR'S LOST has 2 matches. 20. THE TRAGEDY OF MACBETH has 3 matches.
Changed:
<
<
21. THE MERCHANT OF VENICE has 6 matches. 22. THE MERRY WIVES OF WINDSOR has 1 matches. 23. A MIDSUMMER NIGHT'S DREAM has 2 matches. 24. MUCH ADO ABOUT NOTHING has 1 matches. 25. THE TRAGEDY OF OTHELLO, MOOR OF VENICE has 9 matches. 26. KING RICHARD THE SECOND has 1 matches. 27. KING RICHARD III has 3 matches. 28. THE TRAGEDY OF ROMEO AND JULIET has 4 matches. 29. THE TAMING OF THE SHREW has 1 matches. 30. THE TEMPEST has 8 matches. 33. THE HISTORY OF TROILUS AND CRESSIDA has 5 matches. 34. TWELFTH NIGHT; OR, WHAT YOU WILL has 5 matches. 37. A LOVER'S COMPLAINT has 1 matches.
>
>
22. THE MERCHANT OF VENICE has 6 matches. 23. THE MERRY WIVES OF WINDSOR has 1 matches. 24. A MIDSUMMER NIGHT'S DREAM has 2 matches. 25. MUCH ADO ABOUT NOTHING has 1 matches. 26. THE TRAGEDY OF OTHELLO, MOOR OF VENICE has 9 matches. 27. KING RICHARD THE SECOND has 1 matches. 28. KING RICHARD III has 3 matches. 29. THE TRAGEDY OF ROMEO AND JULIET has 4 matches. 30. THE TAMING OF THE SHREW has 1 matches. 31. THE TEMPEST has 8 matches. 34. THE HISTORY OF TROILUS AND CRESSIDA has 5 matches. 35. TWELFTH NIGHT; OR, WHAT YOU WILL has 5 matches. 38. A LOVER'S COMPLAINT has 1 matches.
 Enter book number to view matches, 0 for a new search, -1 to end: 29
Changed:
<
<
Matches of "sail" in book " THE TAMING OF THE SHREW"

TRANIO. Sir, what are you that offer to beat my servant? VINCENTIO. What am I, sir? Nay, what are you, sir? O immortal gods! O fine villain! A silken doublet, a velvet hose, a scarlet cloak, and a copatain hat! O, I am undone! I am undone! While I play the good husband at home, my son and my servant spend all at the university. TRANIO. How now! what's the matter? BAPTISTA. What, is the man lunatic? TRANIO. Sir, you seem a sober ancient gentleman by your habit, but your words show you a madman. Why, sir, what 'cerns it you if I wear pearl and gold? I thank my good father, I am able to maintain it. VINCENTIO. Thy father! O villain! he is a sailmaker in Bergamo. BAPTISTA. You mistake, sir; you mistake, sir. Pray, what do you think is his name? VINCENTIO. His name! As if I knew not his name! I have brought him up ever since he was three years old, and his name is Tranio. PEDANT. Away, away, mad ass! His name is Lucentio; and he is mine only son, and heir to the lands of me, Signior Vicentio. VINCENTIO. Lucentio! O, he hath murd'red his master! Lay hold on him, I charge you, in the Duke's name. O, my son, my son! Tell me, thou villain, where is my son, Lucentio? TRANIO. Call forth an officer.

>
>
Matches of "sail" in book " THE TRAGEDY OF ROMEO AND JULIET"
 
Added:
>
>
Ben. See, where he comes. So please you step aside, I'll know his grievance, or be much denied. Mon. I would thou wert so happy by thy stay To hear true shrift. Come, madam, let's away, Exeunt [Montague and Wife]. Ben. Good morrow, cousin. Rom. Is the day so young? Ben. But new struck nine. Rom. Ay me! sad hours seem long. Was that my father that went hence so fast? Ben. It was. What sadness lengthens Romeo's hours? Rom. Not having that which having makes them short. Ben. In love? Rom. Out- Ben. Of love? Rom. Out of her favour where I am in love. Ben. Alas that love, so gentle in his view, Should be so tyrannous and rough in proof! Rom. Alas that love, whose view is muffled still, Should without eyes see pathways to his will! Where shall we dine? O me! What fray was here? Yet tell me not, for I have heard it all. Here's much to do with hate, but more with love. Why then, O brawling love! O loving hate! O anything, of nothing first create! O heavy lightness! serious vanity! Misshapen chaos of well-seeming forms! Feather of lead, bright smoke, cold fire, sick health! Still-waking sleep, that is not what it is This love feel I, that feel no love in this. Dost thou not laugh? Ben. No, coz, I rather weep. Rom. Good heart, at what? Ben. At thy good heart's oppression. Rom. Why, such is love's transgression. Griefs of mine own lie heavy in my breast, Which thou wilt propagate, to have it prest With more of thine. This love that thou hast shown Doth add more grief to too much of mine own. Love is a smoke rais'd with the fume of sighs; Being purg'd, a fire sparkling in lovers' eyes; Being vex'd, a sea nourish'd with lovers' tears. What is it else? A madness most discreet, A choking gall, and a preserving sweet. Farewell, my coz. Ben. Soft! I will go along. An if you leave me so, you do me wrong. Rom. Tut! I have lost myself; I am not here: This is not Romeo, he's some other where. Ben. Tell me in sadness, who is that you love? Rom. What, shall I groan and tell thee? Ben. Groan? Why, no; But sadly tell me who. Rom. Bid a sick man in sadness make his will. Ah, word ill urg'd to one that is so ill! In sadness, cousin, I do love a woman. Ben. I aim'd so near when I suppos'd you lov'd. Rom. A right good markman! And she's fair I love. Ben. A right fair mark, fair coz, is soonest hit. Rom. Well, in that hit you miss. She'll not be hit With Cupid's arrow. She hath Dian's wit, And, in strong proof of chastity well arm'd, From Love's weak childish bow she lives unharm'd. She will not stay the siege of loving terms, Nor bide th' encounter of assailing eyes, Nor ope her lap to saint-seducing gold. O, she's rich in beauty; only poor That, when she dies, with beauty dies her store. Ben. Then she hath sworn that she will still live chaste? Rom. She hath, and in that sparing makes huge waste; For beauty, starv'd with her severity, Cuts beauty off from all posterity. She is too fair, too wise, wisely too fair, To merit bliss by making me despair. She hath forsworn to love, and in that vow Do I live dead that live to tell it now. Ben. Be rul'd by me: forget to think of her. Rom. O, teach me how I should forget to think! Ben. By giving liberty unto thine eyes. Examine other beauties. Rom. 'Tis the way To call hers (exquisite) in question more. These happy masks that kiss fair ladies' brows, Being black puts us in mind they hide the fair. He that is strucken blind cannot forget The precious treasure of his eyesight lost. Show me a mistress that is passing fair, What doth her beauty serve but as a note Where I may read who pass'd that passing fair? Farewell. Thou canst not teach me to forget. Ben. I'll pay that doctrine, or else die in debt. Exeunt.

Rom. What, shall this speech be spoke for our excuse? Or shall we on without apology? Ben. The date is out of such prolixity. We'll have no Cupid hoodwink'd with a scarf, Bearing a Tartar's painted bow of lath, Scaring the ladies like a crowkeeper; Nor no without-book prologue, faintly spoke After the prompter, for our entrance; But, let them measure us by what they will, We'll measure them a measure, and be gone. Rom. Give me a torch. I am not for this ambling. Being but heavy, I will bear the light. Mer. Nay, gentle Romeo, we must have you dance. Rom. Not I, believe me. You have dancing shoes With nimble soles; I have a soul of lead So stakes me to the ground I cannot move. Mer. You are a lover. Borrow Cupid's wings And soar with them above a common bound. Rom. I am too sore enpierced with his shaft To soar with his light feathers; and so bound I cannot bound a pitch above dull woe. Under love's heavy burthen do I sink. Mer. And, to sink in it, should you burthen love- Too great oppression for a tender thing. Rom. Is love a tender thing? It is too rough, Too rude, too boist'rous, and it pricks like thorn. Mer. If love be rough with you, be rough with love. Prick love for pricking, and you beat love down. Give me a case to put my visage in. A visor for a visor! What care I What curious eye doth quote deformities? Here are the beetle brows shall blush for me. Ben. Come, knock and enter; and no sooner in But every man betake him to his legs. Rom. A torch for me! Let wantons light of heart Tickle the senseless rushes with their heels; For I am proverb'd with a grandsire phrase, I'll be a candle-holder and look on; The game was ne'er so fair, and I am done. Mer. Tut! dun's the mouse, the constable's own word! If thou art Dun, we'll draw thee from the mire Of this sir-reverence love, wherein thou stick'st Up to the ears. Come, we burn daylight, ho! Rom. Nay, that's not so. Mer. I mean, sir, in delay We waste our lights in vain, like lamps by day. Take our good meaning, for our judgment sits Five times in that ere once in our five wits. Rom. And we mean well, in going to this masque; But 'tis no wit to go. Mer. Why, may one ask? Rom. I dreamt a dream to-night. Mer. And so did I. Rom. Well, what was yours? Mer. That dreamers often lie. Rom. In bed asleep, while they do dream things true. Mer. O, then I see Queen Mab hath been with you. She is the fairies' midwife, and she comes In shape no bigger than an agate stone On the forefinger of an alderman, Drawn with a team of little atomies Athwart men's noses as they lie asleep; Her wagon spokes made of long spinners' legs, The cover, of the wings of grasshoppers; Her traces, of the smallest spider's web; Her collars, of the moonshine's wat'ry beams; Her whip, of cricket's bone; the lash, of film; Her wagoner, a small grey-coated gnat, Not half so big as a round little worm Prick'd from the lazy finger of a maid; Her chariot is an empty hazelnut, Made by the joiner squirrel or old grub, Time out o' mind the fairies' coachmakers. And in this state she 'gallops night by night Through lovers' brains, and then they dream of love; O'er courtiers' knees, that dream on cursies straight; O'er lawyers' fingers, who straight dream on fees; O'er ladies' lips, who straight on kisses dream, Which oft the angry Mab with blisters plagues, Because their breaths with sweetmeats tainted are. Sometime she gallops o'er a courtier's nose, And then dreams he of smelling out a suit; And sometime comes she with a tithe-pig's tail Tickling a parson's nose as 'a lies asleep, Then dreams he of another benefice. Sometimes she driveth o'er a soldier's neck, And then dreams he of cutting foreign throats, Of breaches, ambuscadoes, Spanish blades, Of healths five fadom deep; and then anon Drums in his ear, at which he starts and wakes, And being thus frighted, swears a prayer or two And sleeps again. This is that very Mab That plats the manes of horses in the night And bakes the elflocks in foul sluttish, hairs, Which once untangled much misfortune bodes This is the hag, when maids lie on their backs, That presses them and learns them first to bear, Making them women of good carriage. This is she- Rom. Peace, peace, Mercutio, peace! Thou talk'st of nothing. Mer. True, I talk of dreams; Which are the children of an idle brain, Begot of nothing but vain fantasy; Which is as thin of substance as the air, And more inconstant than the wind, who wooes Even now the frozen bosom of the North And, being anger'd, puffs away from thence, Turning his face to the dew-dropping South. Ben. This wind you talk of blows us from ourselves. Supper is done, and we shall come too late. Rom. I fear, too early; for my mind misgives Some consequence, yet hanging in the stars, Shall bitterly begin his fearful date With this night's revels and expire the term Of a despised life, clos'd in my breast, By some vile forfeit of untimely death. But he that hath the steerage of my course Direct my sail! On, lusty gentlemen! Ben. Strike, drum. They march about the stage. [Exeunt.]

But soft! What light through yonder window breaks? It is the East, and Juliet is the sun! Arise, fair sun, and kill the envious moon, Who is already sick and pale with grief That thou her maid art far more fair than she. Be not her maid, since she is envious. Her vestal livery is but sick and green, And none but fools do wear it. Cast it off. It is my lady; O, it is my love! O that she knew she were! She speaks, yet she says nothing. What of that? Her eye discourses; I will answer it. I am too bold; 'tis not to me she speaks. Two of the fairest stars in all the heaven, Having some business, do entreat her eyes To twinkle in their spheres till they return. What if her eyes were there, they in her head? The brightness of her cheek would shame those stars As daylight doth a lamp; her eyes in heaven Would through the airy region stream so bright That birds would sing and think it were not night. See how she leans her cheek upon her hand! O that I were a glove upon that hand, That I might touch that cheek! Jul. Ay me! Rom. She speaks. O, speak again, bright angel! for thou art As glorious to this night, being o'er my head, As is a winged messenger of heaven Unto the white-upturned wond'ring eyes Of mortals that fall back to gaze on him When he bestrides the lazy-pacing clouds And sails upon the bosom of the air. Jul. O Romeo, Romeo! wherefore art thou Romeo? Deny thy father and refuse thy name! Or, if thou wilt not, be but sworn my love, And I'll no longer be a Capulet. Rom. [aside] Shall I hear more, or shall I speak at this? Jul. 'Tis but thy name that is my enemy. Thou art thyself, though not a Montague. What's Montague? it is nor hand, nor foot, Nor arm, nor face, nor any other part Belonging to a man. O, be some other name! What's in a name? That which we call a rose By any other name would smell as sweet. So Romeo would, were he not Romeo call'd, Retain that dear perfection which he owes Without that title. Romeo, doff thy name; And for that name, which is no part of thee, Take all myself. Rom. I take thee at thy word. Call me but love, and I'll be new baptiz'd; Henceforth I never will be Romeo. Jul. What man art thou that, thus bescreen'd in night, So stumblest on my counsel? Rom. By a name I know not how to tell thee who I am. My name, dear saint, is hateful to myself, Because it is an enemy to thee. Had I it written, I would tear the word. Jul. My ears have yet not drunk a hundred words Of that tongue's utterance, yet I know the sound. Art thou not Romeo, and a Montague? Rom. Neither, fair saint, if either thee dislike. Jul. How cam'st thou hither, tell me, and wherefore? The orchard walls are high and hard to climb, And the place death, considering who thou art, If any of my kinsmen find thee here. Rom. With love's light wings did I o'erperch these walls; For stony limits cannot hold love out, And what love can do, that dares love attempt. Therefore thy kinsmen are no let to me. Jul. If they do see thee, they will murther thee. Rom. Alack, there lies more peril in thine eye Than twenty of their swords! Look thou but sweet, And I am proof against their enmity. Jul. I would not for the world they saw thee here. Rom. I have night's cloak to hide me from their sight; And but thou love me, let them find me here. My life were better ended by their hate Than death prorogued, wanting of thy love. Jul. By whose direction found'st thou out this place? Rom. By love, that first did prompt me to enquire. He lent me counsel, and I lent him eyes. I am no pilot; yet, wert thou as far As that vast shore wash'd with the farthest sea, I would adventure for such merchandise. Jul. Thou knowest the mask of night is on my face; Else would a maiden blush bepaint my cheek For that which thou hast heard me speak to-night. Fain would I dwell on form- fain, fain deny What I have spoke; but farewell compliment! Dost thou love me, I know thou wilt say 'Ay'; And I will take thy word. Yet, if thou swear'st, Thou mayst prove false. At lovers' perjuries, They say Jove laughs. O gentle Romeo, If thou dost love, pronounce it faithfully. Or if thou thinkest I am too quickly won, I'll frown, and be perverse, and say thee nay, So thou wilt woo; but else, not for the world. In truth, fair Montague, I am too fond, And therefore thou mayst think my haviour light; But trust me, gentleman, I'll prove more true Than those that have more cunning to be strange. I should have been more strange, I must confess, But that thou overheard'st, ere I was ware, My true-love passion. Therefore pardon me, And not impute this yielding to light love, Which the dark night hath so discovered. Rom. Lady, by yonder blessed moon I swear, That tips with silver all these fruit-tree tops- Jul. O, swear not by the moon, th' inconstant moon, That monthly changes in her circled orb, Lest that thy love prove likewise variable. Rom. What shall I swear by? Jul. Do not swear at all; Or if thou wilt, swear by thy gracious self, Which is the god of my idolatry, And I'll believe thee. Rom. If my heart's dear love- Jul. Well, do not swear. Although I joy in thee, I have no joy of this contract to-night. It is too rash, too unadvis'd, too sudden; Too like the lightning, which doth cease to be Ere one can say 'It lightens.' Sweet, good night! This bud of love, by summer's ripening breath, May prove a beauteous flow'r when next we meet. Good night, good night! As sweet repose and rest Come to thy heart as that within my breast! Rom. O, wilt thou leave me so unsatisfied? Jul. What satisfaction canst thou have to-night? Rom. Th' exchange of thy love's faithful vow for mine. Jul. I gave thee mine before thou didst request it; And yet I would it were to give again. Rom. Would'st thou withdraw it? For what purpose, love? Jul. But to be frank and give it thee again. And yet I wish but for the thing I have. My bounty is as boundless as the sea, My love as deep; the more I give to thee, The more I have, for both are infinite. I hear some noise within. Dear love, adieu! [Nurse] calls within. Anon, good nurse! Sweet Montague, be true. Stay but a little, I will come again. [Exit.] Rom. O blessed, blessed night! I am afeard, Being in night, all this is but a dream, Too flattering-sweet to be substantial.

Mer. A sail, a sail! Ben. Two, two! a shirt and a smock. Nurse. Peter! Peter. Anon. Nurse. My fan, Peter. Mer. Good Peter, to hide her face; for her fan's the fairer face of the two. Nurse. God ye good morrow, gentlemen. Mer. God ye good-den, fair gentlewoman. Nurse. Is it good-den? Mer. 'Tis no less, I tell ye; for the bawdy hand of the dial is now upon the prick of noon. Nurse. Out upon you! What a man are you! Rom. One, gentlewoman, that God hath made for himself to mar. Nurse. By my troth, it is well said. 'For himself to mar,' quoth 'a? Gentlemen, can any of you tell me where I may find the young Romeo? Rom. I can tell you; but young Romeo will be older when you have found him than he was when you sought him. I am the youngest of that name, for fault of a worse. Nurse. You say well. Mer. Yea, is the worst well? Very well took, i' faith! wisely, wisely. Nurse. If you be he, sir, I desire some confidence with you. Ben. She will endite him to some supper. Mer. A bawd, a bawd, a bawd! So ho! Rom. What hast thou found? Mer. No hare, sir; unless a hare, sir, in a lenten pie, that is something stale and hoar ere it be spent He walks by them and sings.

  Enter book number to view matches, 0 for a new search, -1 to end:
Added:
>
>
 

Revision 102015-12-10 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project

Due: Dec 14, 11:55pm

Line: 206 to 206
 Enter book number to view matches, 0 for a new search, -1 to end:
Changed:
<
<
META FILEATTACHMENT attachment="Shakespeare.txt" attr="" comment="" date="1447783897" name="Shakespeare.txt" path="Shakespeare.txt" size="5465307" user="JimSkon" version="1"
>
>

META FILEATTACHMENT attachment="Shakespeare.txt" attr="" comment="" date="1449757531" name="Shakespeare.txt" path="Shakespeare.txt" size="5465289" user="JimSkon" version="2"
 
META FILEATTACHMENT attachment="C_-_shakespeare.png" attr="" comment="" date="1449108089" name="C_-_shakespeare.png" path="C_-_shakespeare.png" size="19227" user="JimSkon" version="1"

Revision 92015-12-09 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project

Due: Dec 14, 11:55pm

Line: 33 to 33
 Some options:

  1. (0.5%) Highlight the matching words (bold or color)
Added:
>
>
  1. (1%) Make searches case insensitive (so searching for "king" matches "king", "King", and "KING", for example.
 
  1. (1%) Add an option to show the matching paragraphs from a selected book (shown in the example below).
  2. (1%) Choose whether to see matching paragraph or just sentences.
  3. (1%) Add support for a second author or set of works. The second file must be at least 1Mb, and you will need to format it appropriately. You will have two programs, one for Shakespeare, and another for the new file.
Line: 74 to 75
  %CODE{"c++"}%
Changed:
<
<
string readParagraph( istream& is )
>
>
tring readParagraph( istream& is )
 { string line; string paragraph;
Line: 83 to 84
  do { getline( is , line );
Changed:
<
<
if (lineNum++ > 0) {
>
>
if (line.length() > 2 && lineNum++ > 0) {
  paragraph += "\n"; } paragraph += line;
Changed:
<
<
} while( line.length() > 2);
>
>
} while( line.length() > 2 && is.fail());
  return paragraph; }

Revision 82015-12-03 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Final Project

Due: Dec 14, 11:55pm

Line: 83 to 83
  do { getline( is , line );
Changed:
<
<
if (lineNum++ > 1) {
>
>
if (lineNum++ > 0) {
  paragraph += "\n"; } paragraph += line;
Line: 98 to 98
 The program should have a vector of book.

Processing

Changed:
<
<

C_-_shakespeare.png
>
>

C_-_shakespeare.png
 

Run Example

Welcome to the Shakespeare search program

Revision 72015-12-03 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Changed:
<
<

Lab 10

>
>

Final Project

 

Due: Dec 14, 11:55pm

Instructions

  • Turn in the code (a cpp file or ideone.com link), and the run outputs as requested below.
Line: 95 to 94
 }

%ENDCODE%

Added:
>
>
 The program should have a vector of book.
Added:
>
>

Processing


C_-_shakespeare.png
 

Run Example

Welcome to the Shakespeare search program
Books (# of paragraphs)

Line: 198 to 202
 

Enter book number to view matches, 0 for a new search, -1 to end:

Deleted:
<
<
 
Deleted:
<
<

  • C_-_shakespeare.png:
    C_-_shakespeare.png
 
META FILEATTACHMENT attachment="Shakespeare.txt" attr="" comment="" date="1447783897" name="Shakespeare.txt" path="Shakespeare.txt" size="5465307" user="JimSkon" version="1"
META FILEATTACHMENT attachment="C_-_shakespeare.png" attr="" comment="" date="1449108089" name="C_-_shakespeare.png" path="C_-_shakespeare.png" size="19227" user="JimSkon" version="1"

Revision 62015-12-03 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Lab 10

Due: Dec 14, 11:55pm

Line: 202 to 202
 
Added:
>
>
  • C_-_shakespeare.png:
    C_-_shakespeare.png
 
META FILEATTACHMENT attachment="Shakespeare.txt" attr="" comment="" date="1447783897" name="Shakespeare.txt" path="Shakespeare.txt" size="5465307" user="JimSkon" version="1"
Added:
>
>
META FILEATTACHMENT attachment="C_-_shakespeare.png" attr="" comment="" date="1449108089" name="C_-_shakespeare.png" path="C_-_shakespeare.png" size="19227" user="JimSkon" version="1"

Revision 52015-11-19 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Lab 10

Due: Dec 14, 11:55pm

Line: 72 to 72
  %ENDCODE%
Added:
>
>
<-- SyntaxHighlightingPlugin -->
string readParagraph( istream& is )
{
    string line;
    string paragraph;
    int lineNum = 0;;

    do
    {
        getline( is , line );
        if (lineNum++ > 1) {
            paragraph += "\n";
        }
        paragraph += line;

    } while( line.length() >  2);

    return paragraph;
}

 
<-- end SyntaxHighlightingPlugin -->
 The program should have a vector of book.

Run Example

Welcome to the Shakespeare search program

Revision 42015-11-18 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Lab 10

Due: Dec 14, 11:55pm

Line: 12 to 12
 
Code Format (Indenting, variable names) 10%
Code Comments 10%
Turning in the run the requested inputs below.. 10%
Changed:
<
<
Turn in a list of extra features added, with a totle of points being sought  
>
>
Turn in a list of extra features added, with a total of points being sought  
 

Problem

Shakespeare Word Search

Revision 32015-11-18 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Lab 10

Due: Dec 14, 11:55pm

Line: 12 to 12
 
Code Format (Indenting, variable names) 10%
Code Comments 10%
Turning in the run the requested inputs below.. 10%
Added:
>
>
Turn in a list of extra features added, with a totle of points being sought  
 

Problem

Shakespeare Word Search

Revision 22015-11-18 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Lab 10

Changed:
<
<

Due: Dec 10, 11:55pm

>
>

Due: Dec 14, 11:55pm

 

Instructions

  • Turn in the code (a cpp file or ideone.com link), and the run outputs as requested below.
  • Remember to format the code as described and the book and text, and to include comments including complete commetns at the beginning of the program.
Line: 17 to 17
  Your goal is to use Object Oriented techniques to read the complete works of Shakespeare from a file, and allow for word searches.
Changed:
<
<
A complete version of all works of Shakespeare in a single file is preseanted here.
>
>
A complete version of all works of Shakespeare in a single file is available here: Shakespeare.txt.
  Your program must do at least the following:
Line: 27 to 27
 
  1. Repeat the above step until the user is done.

Extra credit

Changed:
<
<
Since this is the lass project you will have the opportunity to explore this problem, and add extra credit toward your overall grade. Following are a list of possible options, with a percent of how much it add to your OVERALL grade. You may propose additional improvements for extra credit by emailing me with a proposal, and I will decide if it can be approved, and how much it is worth.
>
>
Since this is the lass project you will have the opportunity to explore this problem, and add extra credit toward your overall grade. Following are a list of possible options, with a percent of how much it add to your OVERALL grade. You may propose additional improvements for extra credit by emailing me with a proposal, and I will decide if it can be approved, and how much it is worth. The maximum extra credit is 10%.
  Some options:
Changed:
<
<
  1. (1%) Add an option to show the matches from a selected book (shown in the example below.
  2. (1%) Add support fot a second author or set of works. The second file must be at least 1Mb, and you will need to format it appropriately. You will have two programs, one for Shakespeare, and onother for the new file.
>
>
  1. (0.5%) Highlight the matching words (bold or color)
  2. (1%) Add an option to show the matching paragraphs from a selected book (shown in the example below).
  3. (1%) Choose whether to see matching paragraph or just sentences.
  4. (1%) Add support for a second author or set of works. The second file must be at least 1Mb, and you will need to format it appropriately. You will have two programs, one for Shakespeare, and another for the new file.
 
  1. (2%) Add support for 5 or more authors, and start with a menu listing the options, and allowing the user to select the works, then to the other operations. This option is mutually exclusive with #2.
  2. (1%) Add support to #3 to search ALL books.
  3. (2%) Add support to #1 & #2 to search for pairs of words, not necessarily adjacent.
  4. (1%) Add support to #5 to search for words within some specified numbers of word apart.
Added:
>
>
  1. (2%) Add Stemming.
 
  1. More to come ...
Changed:
<
<
>
>

The Class Definitations

  %CODE{"c++"}% class paragraph {
Line: 68 to 71
  %ENDCODE%
Added:
>
>
The program should have a vector of book.

Run Example

Welcome to the Shakespeare search program
Books (# of paragraphs)
1.  THE SONNETS (311)
2.  ALLS WELL THAT ENDS WELL (233)
3.  THE TRAGEDY OF ANTONY AND CLEOPATRA (313)
4.  AS YOU LIKE IT (243)
5.  THE COMEDY OF ERRORS (149)
6.  THE TRAGEDY OF CORIOLANUS (331)
7.  CYMBELINE (290)
8.  THE TRAGEDY OF HAMLET, PRINCE OF DENMARK (313)
9.  THE FIRST PART OF KING HENRY THE FOURTH (237)
10.  SECOND PART OF KING HENRY IV (259)
11.  THE LIFE OF KING HENRY THE FIFTH (279)
12.  THE FIRST PART OF HENRY THE SIXTH (312)
13.  THE SECOND PART OF KING HENRY THE SIXTH (287)
14.  THE THIRD PART OF KING HENRY THE SIXTH (285)
15.  KING HENRY THE EIGHTH (233)
16.  KING JOHN (198)
17.  THE TRAGEDY OF JULIUS CAESAR (211)
18.  THE TRAGEDY OF KING LEAR (310)
19.  LOVE'S LABOUR'S LOST (144)
20.  THE TRAGEDY OF MACBETH (506)
21.  THE MERCHANT OF VENICE (203)
22.  THE MERRY WIVES OF WINDSOR (308)
23.  A MIDSUMMER NIGHT'S DREAM (172)
24.  MUCH ADO ABOUT NOTHING (197)
25.  THE TRAGEDY OF OTHELLO, MOOR OF VENICE (223)
26.  KING RICHARD THE SECOND (212)
27.  KING RICHARD III (344)
28.  THE TRAGEDY OF ROMEO AND JULIET (294)
29.  THE TAMING OF THE SHREW (213)
30.  THE TEMPEST (165)
31.  THE LIFE OF TIMON OF ATHENS (226)
32.  THE TRAGEDY OF TITUS ANDRONICUS (195)
33.  THE HISTORY OF TROILUS AND CRESSIDA (306)
34.  TWELFTH NIGHT; OR, WHAT YOU WILL (245)
35.  THE TWO GENTLEMEN OF VERONA (200)
36.  THE WINTER'S TALE (184)
37.  A LOVER'S COMPLAINT (50)
Number of Books: 37

Word to search for:sail
1.  THE SONNETS has 5 matches.
2.  ALLS WELL THAT ENDS WELL has 1 matches.
3.  THE TRAGEDY OF ANTONY AND CLEOPATRA has 7 matches.
4.  AS YOU LIKE IT has 1 matches.
5.  THE COMEDY OF ERRORS has 2 matches.
6.  THE TRAGEDY OF CORIOLANUS has 1 matches.
7.  CYMBELINE has 5 matches.
8.  THE TRAGEDY OF HAMLET, PRINCE OF DENMARK has 5 matches.
10.  SECOND PART OF KING HENRY IV has 2 matches.
11.  THE LIFE OF KING HENRY THE FIFTH has 3 matches.
12.  THE FIRST PART OF HENRY THE SIXTH has 2 matches.
13.  THE SECOND PART OF KING HENRY THE SIXTH has 3 matches.
14.  THE THIRD PART OF KING HENRY THE SIXTH has 6 matches.
16.  KING JOHN has 5 matches.
17.  THE TRAGEDY OF JULIUS CAESAR has 1 matches.
19.  LOVE'S LABOUR'S LOST has 2 matches.
20.  THE TRAGEDY OF MACBETH has 3 matches.
21.  THE MERCHANT OF VENICE has 6 matches.
22.  THE MERRY WIVES OF WINDSOR has 1 matches.
23.  A MIDSUMMER NIGHT'S DREAM has 2 matches.
24.  MUCH ADO ABOUT NOTHING has 1 matches.
25.  THE TRAGEDY OF OTHELLO, MOOR OF VENICE has 9 matches.
26.  KING RICHARD THE SECOND has 1 matches.
27.  KING RICHARD III has 3 matches.
28.  THE TRAGEDY OF ROMEO AND JULIET has 4 matches.
29.  THE TAMING OF THE SHREW has 1 matches.
30.  THE TEMPEST has 8 matches.
33.  THE HISTORY OF TROILUS AND CRESSIDA has 5 matches.
34.  TWELFTH NIGHT; OR, WHAT YOU WILL has 5 matches.
37.  A LOVER'S COMPLAINT has 1 matches.
Enter book number to view matches, 0 for a new search, -1 to end: 29

Matches of "sail" in book " THE TAMING OF THE SHREW"

  TRANIO. Sir, what are you that offer to beat my servant?  VINCENTIO. What am I, sir? Nay, what are you, sir? O immortal gods!
    O fine villain! A silken doublet, a velvet hose, a scarlet cloak,
    and a copatain hat! O, I am undone! I am undone! While I play the
    good husband at home, my son and my servant spend all at the
    university.
  TRANIO. How now! what's the matter?
  BAPTISTA. What, is the man lunatic?
  TRANIO. Sir, you seem a sober ancient gentleman by your habit, but
    your words show you a madman. Why, sir, what 'cerns it you if I
    wear pearl and gold? I thank my good father, I am able to
    maintain it.
  VINCENTIO. Thy father! O villain! he is a sailmaker in Bergamo.
  BAPTISTA. You mistake, sir; you mistake, sir. Pray, what do you
    think is his name?
  VINCENTIO. His name! As if I knew not his name! I have brought him
    up ever since he was three years old, and his name is Tranio.
  PEDANT. Away, away, mad ass! His name is Lucentio; and he is mine
    only son, and heir to the lands of me, Signior Vicentio.
  VINCENTIO. Lucentio! O, he hath murd'red his master! Lay hold on
    him, I charge you, in the Duke's name. O, my son, my son! Tell
    me, thou villain, where is my son, Lucentio?
  TRANIO. Call forth an officer.


Enter book number to view matches, 0 for a new search, -1 to end: 

 

META FILEATTACHMENT attachment="Shakespeare.txt" attr="" comment="" date="1447783897" name="Shakespeare.txt" path="Shakespeare.txt" size="5465307" user="JimSkon" version="1"

Revision 12015-11-17 - JimSkon

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="WebHome"

Lab 10

Due: Dec 10, 11:55pm

Instructions

  • Turn in the code (a cpp file or ideone.com link), and the run outputs as requested below.
  • Remember to format the code as described and the book and text, and to include comments including complete commetns at the beginning of the program.

Grading

Feature %
Program correctness and completeness with respect to defination 70%
Code Format (Indenting, variable names) 10%
Code Comments 10%
Turning in the run the requested inputs below.. 10%

Problem

Shakespeare Word Search

Your goal is to use Object Oriented techniques to read the complete works of Shakespeare from a file, and allow for word searches.

A complete version of all works of Shakespeare in a single file is preseanted here.

Your program must do at least the following:

  1. Read in the entire file of Shakespeare books, and parse it into Books and Paragraphs, where Books is object the contains an entire book (definition below), and Paragraph is an object representation of a paragraph (also below). Thus there will be an array of Books, and each book will be a title plus an array of paragraphs.
  2. Show the user a list of the book titles, alone with the number of paragraphs found in each.
  3. Ask the user for a word to search, and show the users how many paragraphs in each book has a match for this word.
  4. Repeat the above step until the user is done.

Extra credit

Since this is the lass project you will have the opportunity to explore this problem, and add extra credit toward your overall grade. Following are a list of possible options, with a percent of how much it add to your OVERALL grade. You may propose additional improvements for extra credit by emailing me with a proposal, and I will decide if it can be approved, and how much it is worth.

Some options:

  1. (1%) Add an option to show the matches from a selected book (shown in the example below.
  2. (1%) Add support fot a second author or set of works. The second file must be at least 1Mb, and you will need to format it appropriately. You will have two programs, one for Shakespeare, and onother for the new file.
  3. (2%) Add support for 5 or more authors, and start with a menu listing the options, and allowing the user to select the works, then to the other operations. This option is mutually exclusive with #2.
  4. (1%) Add support to #3 to search ALL books.
  5. (2%) Add support to #1 & #2 to search for pairs of words, not necessarily adjacent.
  6. (1%) Add support to #5 to search for words within some specified numbers of word apart.
  7. More to come ...

<-- SyntaxHighlightingPlugin -->
class paragraph {
    private:
        string text;
    public:
        paragraph();
        void setText(string p);
        bool search(string word);
        void display();
};

class book {
    private:
        string title;
        vector<paragraph> paragraphs;
    public:
        book();
        void setTitle(string title);
        string getTitle();
        int search(string word);
        void add(paragraph p);
        void clear();
        int getParaCount();
        void displayMatches(string search);
};

 
<-- end SyntaxHighlightingPlugin -->

META FILEATTACHMENT attachment="Shakespeare.txt" attr="" comment="" date="1447783897" name="Shakespeare.txt" path="Shakespeare.txt" size="5465307" user="JimSkon" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback