Provide an “R” script that includes code and explanatory #comments for the following steps:
Load the full 2018-2020 workspace.
1) Choose a set of key words or phrases that are useful for your team project and use GloVe word embeddings to find additional synonyms within the corpus. List any new words as a #comment
2) Generate a frequency table showing the appearances per document of your key words/phrases using the dfm_select or dfm_lookup function.
3) Use the kwic function to extract a text window around one of your key words or phrases and combine the pre- and post- windows.
4) Choose one of the following and analyze the text windows: readability, lexical diversity, or one of the sentiment analysis approaches.
5) Write a few sentences at the end about what this analysis shows you (include this as # comments at the end of your R script).
6) Please use the stringr and regex syntax to view all instances of “wage,” “wages,” “Wage,” and “Wages” in the second document.
Which member of Congress utters the word “wage” (or a variant thereof) in this document?
7) Extract all instances of “wage” (and its variants) that occur within 50 # characters of the word “living” in the first 50 documents. Save these matches # to an object named “living_wage”
How many matches did you find?
Which of the first 10 documents has the highest number of matches?
What were the phrases captured by the regex?
Now run the code again, expanding the window to 100, 200, and 500 characters. # Does the regex find any additional phrases? If so, what are they?
8) Use the kwic command to extract a 100-token window around the regex you wrote # for Problem 7. Save this kwic object as “lw_window” and convert it into a data
frame named “df_lw_window”.
What are the dimensions of this data frame?
9) As you may have noticed, many words are split in half by a hyphenation followed by at least one space (“- “).
This is a function of how the PDF documents were originally formatted and the difficulty of converting these documents to plain text.
Write a regex to replace all occurrences of this break in the first 10 documents in the cr_txt object and create a new data frame named “cr_txt_cleaned.”
Then check the text to make sure that you have performed this replacement properly.
Robert Frost's Poems Robert Frost's artist Robert Frost has numerous topics in his verse. One of the subjects that has been rehashed is characteristic. He generally examines how wonderful nature is the way ruinous it is. Ice consistently examines nature in his sonnet. As a matter of first importance, there are numerous regular articulations in the sonnet "Stop by the woods on a snow-shrouded night". Ice's first sentence as of now discusses the woodland. What? I think their backwoods is the thing that I know (Ln 1,1105). Likewise, he said that the storyteller in the sonnet plunked down and got a kick out of the chance to see the day off. Creator, collection and artist Ruitamir was one of the soonest finds of fellow benefactor of Robert Frost 's abstract sonnet "Seven Art" and composed a presentation and analysis on "Robert Frost' s Poetry". He previously clarified that Frost is absolutely a common, dedicated man, his normal expert articulation and articulation of articulation. Furthermore, it got exceptionally high caliber. Presentation He brought up that there are different writers who are likewise individuals of industry and work, and clarified that about ice, yet once he was a rancher, a young men, a shoe store, and a town teacher It functioned as. Robert Frost, otherwise called "Nature Boy" in 1922, composed this dazzling sonnet. It was later declared in his long sonnet "New Hampshire". Robert Frost, who experienced childhood in San Francisco and New Hampshire, composed a verse that rises above age and time and twirled the peruser. The sonnet halted at the snow-secured night woods, investigated the writer's thought processes, the internal feelings of the storyteller, and his obsession to the backwoods. Robert Frost is known as the "artist of the zone." I don't know whether Robert Frost follows the beautiful inclination of his time and decides to compose a sonnet that he is keen on. Robert Frost and Langston Hughes Basic Information: Author: Robert Frost's Poetry: Not to Take a Publication Date: 1916 Abstract: Frost composes this tune about how individuals walk, chooses the method of verse I needed to do. The two streets appear to be green too. Be that as it may, while investigating the storyteller, he started to feel that he may have picked less travel course. Rhyming framework and line: This sonnet has an Ian language tetrameter. There are nine syllables for every line. Graceful establishment: Robert Frost's sonnet "Out, Out" portrays the peruser with a bizarre and peculiar passing picture; the kid kicks the bucket of flesh eating cutting tool and they remove young men's hands for blood . So as to depict such a deplorable mishap, Robert causes the peruser to comprehend why individuals use components of different stories, a great deal of pictures, feelings, and the impression of the entire story. Likewise, Frost additionally referenced William Shakespeare's work "Macbeth". This offers thoughts to perusers who have perused Macbeth previously.>GET ANSWER