Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write The program in C++ Program 2 Requirements What is This? Hello Bonjour Hola Hallo Hall 1 Goals 1. 2. 3. 4. To use a

Write The program in C++

image text in transcribedimage text in transcribed

Program 2 Requirements What is This? Hello Bonjour Hola Hallo Hall 1 Goals 1. 2. 3. 4. To use a file for input and output Use string library functions and parse data Use Arrays To implement complex logic in our program 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 https://en.wikipedia a. iki/Letter frequen 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

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions

Question

What is the median of X in example 4?

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago