{"id":97334,"date":"2022-06-06T00:00:00","date_gmt":"2022-06-06T00:00:00","guid":{"rendered":"https:\/\/nursingstudybay.com\/2022\/06\/06\/working-with-dictionaries-2\/"},"modified":"2022-06-06T00:00:00","modified_gmt":"2022-06-06T00:00:00","slug":"working-with-dictionaries-2","status":"publish","type":"post","link":"https:\/\/www.studyproessays.com\/help\/working-with-dictionaries-2\/","title":{"rendered":"Working with Dictionaries"},"content":{"rendered":"<p>IT 279<br \/>\nFall, 2022<br \/>\nCaliff<br \/>\nProgramming Assignment 2:<br \/>\nWorking with Dictionaries<br \/>\nDue date for Part 1: Monday, September 26, 2022 at 11:55 pm<br \/>\nDue date for Part 2: Wednesday, October 5, 2022 at 11:55 pm<br \/>\nRemember that this is an individual assignment. Do not discuss with your classmates (or<br \/>\nothers) and do not search for code on the web. You are encouraged to come to me for<br \/>\nhelp.<br \/>\nDescription:<br \/>\nYou are developing a C++ program that does spell checking on a text file. The program<br \/>\nwill take 3 command line parameters which are names for:<br \/>\n1) a file with a list of correctly spelled words<br \/>\n2) a text file to check<br \/>\n3) an output file for the structure of the dictionary (not relevant to the task, but<br \/>\nimportant for grading your data structure accuracy).<br \/>\nThe program will first build a dictionary from the word list. Then it will check the file,<br \/>\nprinting information about each misspelled word and suggestions for possible corrections<br \/>\nto standard output. Finally, it will print the dictionary structure to the specified output<br \/>\nfile.<br \/>\nFormat of spelling output<br \/>\nFor each misspelled word print the word and the line it was found on followed by<br \/>\ninformation about the suggestions found, followed by a blank line. Examples:<br \/>\nsaed on line 5<br \/>\nSuggested corrections:<br \/>\nsaved<br \/>\nsad<br \/>\nremirmand on line 6<br \/>\nNo suggestions found<br \/>\nNote that the first line of the file is line 1, not line 0. We want this output to be human friendly, and most humans start counting at 1, rather than 0. Use tabs for the indentation<br \/>\nof the suggested words.<br \/>\nHow to generate suggestions<br \/>\nAs suggested corrections, list any words in the dictionary that are obtainable by applying<br \/>\nany of the following rules (one at a time):<br \/>\n1. Add one letter to the word (at any position)<br \/>\n2. Remove one letter from the word<br \/>\n3. Exchange adjacent characters<br \/>\nThere is an opportunity to earn extra credit by thoughtfully expanding the suggestion list.<br \/>\nSee below.<br \/>\nYou will be starting with a partial program, which includes a dictionary, implemented as<br \/>\na basic binary search tree and the framework of the actual program spell checking<br \/>\nprogram.<br \/>\nYou will be filling in the part of the program that reads the word list and build the<br \/>\ndictionary as well as the part that does the actual spell checking.<br \/>\nThen you will also be modifying the dictionary to be an AVL tree implementation. Note<br \/>\nthat your book does have some useful reference code to help you get started with the<br \/>\nAVL tree conversion.<br \/>\nFor part 1, you will submit your program file and your AVL tree implementation, based<br \/>\non the binary search tree implementation you were given. The program you submit must<br \/>\nwork with either your Dictionary implementation or the provided Dictionary with NO<br \/>\nchanges whatsoever. If the program does not compile with either Dictionary version, it<br \/>\nwill be considered a compile-time error (automatic F).<br \/>\nFor part 2, you will create a new Dictionary with the exact same interface (i.e. the same<br \/>\npublic function signatures) but implemented as a hash table using double hashing to<br \/>\nhandle collisions. You will submit your program with that Dictionary. The program must<br \/>\nstill work with both the original Dictionary and your hash table with no modifications. If<br \/>\nyour AVL tree had issues and you have fixed it for an improved grade, you may also<br \/>\nresubmit the AVL version of the Dictionary.<br \/>\nSimplifying Assumptions:<br \/>\n\u25aa We don\u2019t care about case; convert everything to lower case when reading from all<br \/>\nfiles.<br \/>\n\u25aa Words are strings of letters (a-z). Treat everything that isn\u2019t a letter as breaking<br \/>\nup words. Note that this means you may have multiple \u201dwords&#8221; on a single line in<br \/>\nyour word list \u2013 both should be entered in the dictionary. It also means that you<br \/>\nmay have duplicates in your word list, which must be appropriately handled.<br \/>\n\u25aa Each line ends with a newline character.<br \/>\n\u25aa All files are in the same directory as the program.<br \/>\nStarting and sample files:<br \/>\nYou will find Dictionary.h, Dictionary.cpp, and startingSpellChecker.cpp in<br \/>\n\/home\/ad.ilstu.edu\/mecalif\/it279\/Program3. Make sure you read them carefully, including<br \/>\nall comments and understand how the code works. You will be adding code to all of these<br \/>\nfiles. You should not be removing anything from any files for part 1. For part2, you will<br \/>\nlargely replace the contents of the Dictionary files, but make sure that you do not modify<br \/>\nthe prototypes\/headers of the public methods, and that you do not remove or add any<br \/>\npublic methods.<br \/>\nYou will also find a set of .txt files. I have provided dictionary files in multiple sizes<br \/>\nalong with test1.txt, a file with several misspellings.<br \/>\nYou have been given a simple test program (test_dictionary.cpp) along with correct<br \/>\noutput for the BST you were given as well as the AVL and hash table versions you will<br \/>\nbe creating.<br \/>\nI have also provided sample output from the spellchecker program. Note that the<br \/>\ndictionary structure output can be used to determine whether you are producing a correct<br \/>\nAVL tree. The hash table version of the dictionary structure output can be used to<br \/>\nexamine your hash table. In addition to the standard output files, I have provided output<br \/>\nfrom printing the dictionary in order for each dictionary so that you can check those with<br \/>\na separate little program. Note that the output from that will not vary from one<br \/>\nimplementation to another.<br \/>\nHash table details:<br \/>\nYou will use double hashing. The prime numbers that you will use for your hash table<br \/>\nsizes are {101, 211, 431, 863, 1733, 3469, 6947, 13901, 27803, 55609, 111227, 222461,<br \/>\n444929, 889871}. The prime numbers for your double hashing will be {97, 199, 421,<br \/>\n859, 1723, 3467, 6917, 13883, 27799, 55603, 111217, 222437, 444901, 889829}.<br \/>\nUse the hash function from figure 5.4 in your textbook.<br \/>\nRehash immediately before adding an entry that will push the table above 50% full.<br \/>\nExtra Credit Opportunity:<br \/>\nA and B programs may earn a small amount of extra credit for improving on the<br \/>\nalgorithm to generate suggested corrections. Requirement for extra credit:<br \/>\n1) You must indicate in the textbox in your ReggieNet submission that you have<br \/>\ndone the extra credit and you must explain how you are generating additional<br \/>\nsuggested words and indicate which dictionary file to use for your sample<br \/>\ninput\/output demonstrating your work.<br \/>\n2) You must have an optional 4<br \/>\nth command line parameter. If the 4th parameter is<br \/>\nprovided (whatever the contents of it), then your program will generate the<br \/>\nadditional suggestions. If there is no 4th command line parameter, the program<br \/>\nmust stick to the specified suggestions.<br \/>\n3) You must provide an input file and sample output that demonstrates your<br \/>\nadditional suggestions. Please try to use sample input that doesn&#8217;t generate many<br \/>\nsuggestions outside of your extra credit modifications. This will help in assessing<br \/>\nhow effective your additions were.<br \/>\n4) The additions must be thoughtful. An &#8220;improvement&#8221; that simply generates a<br \/>\nhuge number of suggestions without regard to whether they might make sense<br \/>\nwill not gain additional credit.<br \/>\nSubmission requirements:<br \/>\nWhen you use them, all versions of the dictionary must be in files named Dictionary.h<br \/>\nand Dictionary.cpp. However, we need to separate them out for submission. So your<br \/>\nAVL tree will be submitted as AVL_Dictionary.h and AVL_Dictionary.cpp. Your hash<br \/>\ntable will be submitted as Hash_Dictionary.h and Hash_Dictionary.cpp. The grading<br \/>\nprocess will rename your files before compiling.<br \/>\nRemember that your program file must work with the original Dictionary files as<br \/>\nsubmitted. Submit a single zip containing only the source code files (no folders, no data<br \/>\nfiles, no executables, no test files, not even any makefiles for this) and your sample test<br \/>\nand output files if doing extra credit.<br \/>\nA validation script will be provided that will help you determine whether your<br \/>\nsubmission zip file is correct. It is your responsibility to make sure that your program<br \/>\ncompiles successfully when you give the validation script your zip file. The validation<br \/>\nscript will NOT test your code for you; it will only make sure your program compiles.<br \/>\nFailure to submit your program in accordance with instructions will result in a grade<br \/>\nreduction.<br \/>\nGrading Standards:<br \/>\nPrograms will be graded in accordance with the provided Program Grading Criteria.<br \/>\nPart 1 will be 40% of the grade and Part 2 will be 60% of the grade. If you correct issues<br \/>\nwith part 1 when submitting part 2, you will receive half of the difference between the<br \/>\noriginal grade for part 1 and the grade that part of program would earn with the<br \/>\ncorrections.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>IT 279 Fall, 2022 Califf Programming Assignment 2: Working with Dictionaries Due date for Part 1: Monday, September 26, 2022 at 11:55 pm Due date\u2026<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8802,7317,8805,8804,8803],"tags":[7676,7670,7555,3503,7673,7554,7550,7672,7671,7553,7551,7558,7556,7674,7552,7675,7557,7324],"class_list":["post-97334","post","type-post","status-publish","format-standard","hentry","category-dissertation-help-london","category-dissertation-help-online","category-dissertation-tutor","category-expert-assignment-help","category-university-assignment-help","tag-assignment-help-uk-no-1-writing-services-company","tag-assignment-uk-assignment-writing-service-assignment-help","tag-assignment-writer","tag-assignment-writing-help","tag-assignment-writing-help-in-london","tag-assignment-writing-service-uk-essays","tag-assignment-writing-service-uk-with-20-off-assignment-help","tag-best-assignment-writing-service-uk","tag-best-essay-writing-services-in-uk-online-essay-help","tag-cheap-assignment-writing-service-uk","tag-cheap-uk-assignment-writing-services","tag-custom-assignment-writing-and-proofreading-service","tag-online-assignment-help-uk","tag-uk-assignment-writing","tag-uk-assignment-geek","tag-uk-assignment-help-services-from-best-writing-experts","tag-uks-1-experts-proofreaders-hire-our-thesis-advisors","tag-university-assignment-help"],"_links":{"self":[{"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/posts\/97334","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/comments?post=97334"}],"version-history":[{"count":0,"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/posts\/97334\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/media?parent=97334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/categories?post=97334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/tags?post=97334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}