Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Here is the text: Modern and forwarding-thinking Ontario Tech University advances the discovery and application of knowledge to accelerate economic growth regional development and social

image text in transcribedHere is the text:

Modern and forwarding-thinking Ontario Tech University advances the discovery and application of knowledge to accelerate economic growth regional development and social innovation We inspire and equip our students and graduates to make a positive impact in a tech-focused world We believe it's not only about developing the next tech breakthrough Understanding and integrating the social and ethical implications of technology is our key differentiator We adapt to the ever-changing educational landscape by experimenting with the most effective ways to deliver flexible and dynamic learning giving more choices to more people By offering a range of credentials and experiential learning opportunities and sparking entrepreneurship activities we provide learner-centred educational options Our students enjoy a stimulating campus life experience that includes hundreds of clubs cultural and community events recreational opportunities and a growing varsity athletics program featuring basketball badminton curling dance golf hockey rowing soccer and women's lacrosse In addition to excellence in teaching we offer our students experiential learning opportunities through internships co-ops practicums research projects and more In fact 85 percent of upper-year undergraduate students participate in experiential learning We collaborate with industry community government and academic organizations bringing them together with our researchers and students to uncover innovative solutions for our partners' most pressing problems The home to more than 80 specialized research laboratories and facilities we're committed to attracting passionate and capable scholars to our high- tech campus

Introduction The main purpose of this lab is to refresh you with the fundamentals of C++ with a Natural Language Processing (NLP) activity. Activity You are required to write a C++ program that would serve as a word count. Word counting is used quite a lot in Natural Language Processing (NLP) and is a pretty interesting concept that is used in various applications today like spam detection, sentiment analysis, etc. You are provided a text file (data.txt) with this lab which is an excerpt from Ontario Tech University's history. All the punctuation except the apostrophes and hyphens are intentionally removed from the text. You are required to perform the following tasks: - Read the text file word by word. - Create a collection of words in such a way that your program can distinguish between different words, e.g., store each different word in a vector. Note that 'Our' and 'our' should count as the same word, i.e. your program treats upper and lower case letters as the same. - Every time a word appears your program is required to count the occurrence of that word in the file. - Finally print a report with each word and number of times it occurred in the text file provided. Your program should at least have the following methods: - bool isFound(vector sstring> v, string word) which takes a vector and a word to make a search of that word in that vector. If the word is found, return true else false. - void printReport(vector words, vector counts) which contains two vectors; one with unique words and other with count of those unique words. This method should simply have a cout statement that tells how many times each word has appeared in the file. You are free to create other methods as well but your program should have at least above two methods. Below is the expected output of the program: and: 18 tech: 2 university: 1 advances: 1 the: 6 Please note that the output shown above is not the complete output but should at least give you an idea of what your program should produce

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

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions

Question

5. Identify the logical fallacies, deceptive forms of reasoning

Answered: 1 week ago

Question

6. Choose an appropriate organizational strategy for your speech

Answered: 1 week ago