Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise Three - 40 points Create a txt file called input.txt with text copied from a movie or a product review from the web-do not

image text in transcribed

Exercise Three - 40 points Create a txt file called input.txt with text copied from a movie or a product review from the web-do not 3 exceed 100 words. In one single matlab script file (exercise02.m), implement the following: 1. Read in the lines of the text file using the fgetl function. Store the lines of this file in a cell array. Useful functions: for, fopen, fgetl. 2. Preprocessing includes: remove punctuation, convert to lower case, remove stop words. [you can do this before or after tokenizing the string, see funs lowerO for lower case conversion] Parse your stored lines of text into their constituent words using the strtok function.Store all of the words in the entire document in a cell array with one word per index 3. 4. Create a lexicon consisting of all of the unique words in all the files. Useful function: unique. 5. Create a column vector representing how many times each lexicon word occurs in the document. This is a word vector representation for the document. Useful function: zeros

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 And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

Identify the diff erent civil competencies

Answered: 1 week ago

Question

Discuss the Hawthorne experiments in detail

Answered: 1 week ago

Question

Explain the characteristics of a good system of control

Answered: 1 week ago

Question

State the importance of control

Answered: 1 week ago

Question

What are the functions of top management?

Answered: 1 week ago

Question

Apply your own composing style to personalize your messages.

Answered: 1 week ago

Question

Format memos and e-mail properly.

Answered: 1 week ago