Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Complete the following steps and then answer the exercise questions below. Step 1 . Copy the Chapter 1 2 exercise text data into a folder

Complete the following steps and then answer the exercise questions below.
Step 1. Copy the Chapter 12 exercise text data into a folder that you can access from RStudio.
Step 2. In RStudio, load the library needed to conduct text mining analysis.
Step 3. Set the file path in RStudio to the directory where you stored the text document for this exercise. Import the text document into an appropriately named data object in RStudio.
Step 4. Using tm_map() functions, remove punctuation and English stopwords and make all tokens lowercase.
Step 5. Convert the text data into a document term matrix.
Step 6. Sum up the total word frequency for the terms in the matrix.
Step 7. Output the word list generated in step 6 as a CSV text file. Open the file as a spreadsheet and answer the following questions. Ignore any tokens that are less than three letters long.
Which word appears most prevalently in this text?
country
applause
year
policy
Bookmark question for later
Among the top 20 tokens, which two would be most likely to be combined into a single token if word stemming were applied?
make/time
America/Americans
jobs/work
people/jobs
Bookmark question for later
In speeches during his presidency, George W. Bush mentioned the nation of Afghanistan 57 times. How often did Barack Obama mention Afghanistan?
Less than George W. Bush did
Obama does not mention Afghanistan in this text.
The same amount as George W. Bush did
More than George W. Bush did
Bookmark question for later
How many times in the text is the word education mentioned?
30
84
185
52
Bookmark question for later
Barack Obama was well known for his focus on environmental concerns. How many times did he mention earth,climate, or any version of the word stem environ?
118
40
52
423

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_2

Step: 3

blur-text-image_3

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

Students also viewed these Databases questions