Answered step by step
Verified Expert Solution
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 Copy the Chapter exercise text data into a folder that you can access from RStudio.
Step In RStudio, load the library needed to conduct text mining analysis.
Step 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 Using tmmap functions, remove punctuation and English stopwords and make all tokens lowercase.
Step Convert the text data into a document term matrix.
Step Sum up the total word frequency for the terms in the matrix.
Step Output the word list generated in step 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 tokens, which two would be most likely to be combined into a single token if word stemming were applied?
maketime
AmericaAmericans
jobswork
peoplejobs
Bookmark question for later
In speeches during his presidency, George W Bush mentioned the nation of Afghanistan 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?
Bookmark question for later
Barack Obama was well known for his focus on environmental concerns. How many times did he mention earthclimate or any version of the word stem environ
Step 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