Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A C/C++ program 1 Goals 1. To use a file for input and output 2. Use string library functions and parse data 3. Use Arrays

A C/C++ program
image text in transcribed
image text in transcribed
1 Goals 1. To use a file for input and output 2. Use string library functions and parse data 3. Use Arrays 4. To implement complex logic in our program 5. Write a program in C++ We will build a program where the program will analyze the letter frequency of a text and use it to determine the language that the text was written in. You will use this with a text file of a book 2 Requirements Style Guide Follow the instructions in the style guide fully. There are deductions for style Write a program to automatically determine the language that a 10-page or longer document was written in based on the percentage of letter frequency. Longer documents, e.g. a book, would come closer to these percentages. You need to find the best fit. A chart of letter frequencies in the English and Italian languages can be found at a. wiki ue b. First find the letter frequency of each letter of the alphabet in the document. Ignore punctuation. Next build a table that has the percentages of each letter for English and Italian based on the Wikipedia table with the relative frequencies of letters in other languages. You can consider more languages if you would like Your program may have the user input the name of the document that will be analyzed or you can put it in your program c. d. To analyze a document, read in the text and count how many times each letter occurs in the text. You can ignore all numbers and symbols that you find in the text, and upper and lower- case letters should be considered the same for the counting process (you can convert all letters to lower case). Store the number of each letter in an array You should then compute the percentage that each letter occurred in the document and generate a frequency table like the one in Wikipedia. Use another array to store this information. e

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+ Are they breakable for any reason?

Answered: 1 week ago

Question

=+When and under what circumstances are contracts renegotiated?

Answered: 1 week ago