Question
The text file is here below: Modern and forwarding-thinking Ontario Tech University advances the discovery and application of knowledge to accelerate economic growth regional development
The text file is here below:
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
You are required to write a C++ program that would serve as a word count. Word count 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 class called that - Has 2 data members, i.e., - Has appropriate getters and setters - At least one constructor - Uses the this keyword to help distinguish between data members and local variables - Create a collection of words in such a way that your program can distinguish between different words, i.e., store each different word in an object of WordCounter class. - 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. - You can only use Your program should at least have the following methods: which takes a vector of WordCounter objects and a word to make a search of that word in that vector. If the word is found, return true else false. function that counts the occurrence of a word. It is your responsibility to find out which arguments should be provided to this function. which should simply use cout to tell how many times each word has appeared in the file. Below is the expected output of the program: and: 18 advances: 1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started