Utilizes dynamic programming

Assignment Help Data Structure & Algorithms
Reference no: EM132181368

After a file compression failure, all the white space among words in a text file was lost.

Write a C++ program which utilizes dynamic programming to get all of the possible original documents (i.e. with white spaces between words) and ranks them in order of likelihood; all in minimal time.

What you have at your disposal:
- List of unsorted top 100000 English words most used up until August 2005 which includes #comments showing you the popularity class of the word in the language: dictionary.txt

- List of unsorted top 20000 English words (and 20000 with the first letter capitalized for ease): dictionary2.txt Note that this library does not have the popularity classes comment so you must assume the popularity classes yourself. The capitalized versions of the words are in the second half of the document so for ease you need to think of them as in the same popularity class as the lower case ones above.

- dictionary3.txt is a version of dictionary2 in which the lowercase and caps version of the same word are placed back to back.

Methodology:
- Assume your input document will be in the form of a text file
- Your output should be a series of files, each containing one the possible original documents as well as a console print out (and/or additional file) including the ranking of the outputs.
- You will need to use a proper data structure for storing your English dictionary in memory. This will heavily effect your running time.
- For simplicity you may assume that only the words in the dictionary will show up in your compressed text.
- Your program will need to know how to handle punctuation that separate sentences such as: . ? ! ;
- You may remove words with none-English letters and other problems from the library
- You may also remove all the single letter words except for 'I' , 'A', and 'a' from the library or handle them in another way. If you do not handle this situation your program will create exponentially many outputs.

Testing:
- Construct sentences and paragraphs from the words in the dictionary. These need not be semantically meaningful sentences as your task is to generate all possible outcomes using dynamic programming. This means the ranking of outputs is in part based on the popularity class of the words used.

Attachment:- Dynamic programming.zip

Verified Expert

In this assignment, we have done c++ program and we have done analysis of dictionary and we have remove all the unwanted or non English word from the program and add the ranking to the word.Here we have done formatting all the dictionary word and create the paragraph from the dictionary.

Reference no: EM132181368

Questions Cloud

Write a letter to the parents of your future students : Write a letter to the parents of your future students that you will have the following year, describing readiness for learning indicators.
They relate to the hr role of health administrator : Explain the following subjects as they relate to the HR role of a health administrator:
Create a journal that you will use to memorialize experience : Create a journal that you will use for the semester to memorialize your experience.
What are the key symptoms of groupthink : What are the key symptoms of groupthink? What problems and shortcomings can arise in the decision-making process as a result of groupthink?
Utilizes dynamic programming : Utilizes dynamic programming to get all of the possible original documents (i.e. with white spaces between words) and ranks them in order of likelihood
Describe various forms of business entities he might choose : Describe the factors that are relevant when choosing a business entity and describe the various forms of business entities he might choose.
Examine the pros and cons of automated grading within this : Examine the pros and cons of automated grading within this LMS. Determine the main types of questions or assignments that can be auto graded within the LMS.
What proportion of females was completely cured : NUT821: Research Methods & Biostatistics for Food & Nutrition Sciences SPSS Biostatistics Assignment - What proportion of females was completely cured
Write a professional development plan for your career : Influences: A brief description of any additional forces (social, economic, political, or institutional) that may influence your nursing education role.

Reviews

inf2181368

12/19/2018 11:43:06 PM

It should be similar to dict 3 Here is dictionary 2.txt 311 12142_1 diction ary2.txt Experts Mind.com, I really appreciate for my assignment work. They have given me the assignment before a day to my deadline. It is cheaper than other sites. Thanks

Write a Review

Data Structure & Algorithms Questions & Answers

  Program to create huffman codes

Write a C++ program to create Huffman codes. Program input is a file called freq.txt (make up your own file for testing) that contains data on the characters in some cleartext file in the form of each character's non-zero frequency of occurrence i..

  Design a method to find the middle node of a doubly linked

How can you tell which way is better? Evaluate your Java code using both experimental studies and asymptotic analysis.

  Algorithm for finding smallest element in unsorted array

Consider the following algorithm for finding the smallest element in an unsorted array: RANDOMMIN(A[1 .. n]). What is the exact expected number of executions of line ( )?

  What are the icmp type and code numbers

Examine the corresponding ping reply packet. What are the ICMP type and code numbers? What other fields does this ICMP packet have? How many bytes are the checksum, sequence number and identifier fields?

  What are the characteristics of a binary tree

What are the characteristics of a binary tree? Define the left child of node n in a binary tree. What are the three properties of each node n in a binary search tree

  Ambiguity in proposed algorithm-in representation algorithm

Describe distinction between the ambiguity in proposed algorithm and ambiguity in representation of the algorithm.

  What is the smallest aa-tree

Suppose that the level data member in an AA-tree is represented by an 8-bit byte. What is the smallest AA-tree that would overflow the level data member.

  1 add 12ten to 15ten in binary and then subtract 12ten from

1. add 12ten to 15ten in binary and then subtract 12ten from 15ten in binary.2. using 4-bit numbers to save space

  Cost control techniques

Assume your company has just completed the Initiation Process for implementing an Email System Upgrade. It was identified in a recent meeting with management leaders from the Sales,

  Describe a method for combining t1 and t2 into a binary tree

Describe a method for combining T1 and T2 into a binary tree T, whose nodes hold the union of the entries in T1 and T2 and also satisfy the heap-order property.

  Determine picker route in storage zone of french warehouse

Determine the picker route in the storage zone of the French warehouse of the Guillen company, using the S-shaped heuristic, the largest gap heuristic, the combined heuristic and the aisle-by-aisle heuristic.

  What queue model is this

What queue model is this, Is the system stable, What is the total delay experienced by a customer in this system, from the moment it arrives until it is served?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd