Open lindaalvarez opened 1 week ago
Hello @lindaalvarez ,
Thanks for your questions!
See:
dat$mission %>% head()
anne_corpus_tokens %>% dfm() %>% dfm_wordstem() %>% topfeatures( 50 )
Let me know if you have any other questions!
thank you so much for your help! I went ahead and changed it and now it's working (:
@castower I am now in P3-Q2 part where we are supposed to create a random sample of 20 organizations, but I keep getting this error:
sample <- dplyr::sample_n( d.immigrant, 20 ) print(sample)
Warning in gsub("^\s+|\s+$", "", y) :
unable to translate 'Arts, Culture, and Humanities: Arts, Cultural Organizations
@lindaalvarez
You can email me your .RMD file and I'll take a look.
@castower I'm hoping for clarification on part 2 tabulating and stemming chunks. If I am not mistaken, we are to use something like this to tabulate words, is that right?
tokens %>% dfm() %>% dfm_wordstem() %>% topfeatures(10)
Second related question is about the 'stemming' section. It uses the same code chunk, is that just to reiterate stemming or is there supposed to be a different result when we run that?
I'm assuming it was to reiterate how stemming works but wanted to confirm before I turn the lab in.
Thank you in advance.
@swest235
tokens %>% dfm() %>% topfeatures(10)
Hello, I have three questions/clarifications that I wanted to run by you @castower
library(quanteda)
Convert mission statements to lowercase
dat$mission <- tolower(dat$mission)
Create a corpus from the full dataset
corp <- corpus(dat, text_field = "mission") corp
my texts 4 and 5 show up like this and I am not sure why: text4 : " " text5 : " "
I wanted to clarify that we will be replacing the 10 terms on the my_dictionary with 10 terms that we see are fit for the lab correct?
When I run the tokens code I get an error and I'm not quite sure how to fix it. tokens %>% dfm_stem( stem=F ) %>% topfeatures( ) tokens %>% dfm( stem=F ) %>% topfeatures( ) Error in dfm_stem(., stem = F) : could not find function "dfm_stem"
Thank you so much for your time and help