text_mining.Rmd
This vignette creates a document-feature matrix from the corpus and filters it a number of tokens representing the country locations. Because the text mining is based on the text of the articles (that we cannot distribute), the vignette is not executed.
library("magrittr")
filtered_dfm <- get_dfm() %>% filter_dfm()
filtering_tokens <- readRDS(system.file("extdata", "country_tokens.Rds", package = "wateReview")) head(filtering_tokens) #> [1] "argentina" "bahama" "barbado" "beliz" "bolivia" "brazil"
obj_dtm <- get_dtm(filtered_dfm, filtering_tokens)