Difference: Lab10 (31 vs. 32)

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"
 
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