Retrieve or create a document-feature matrix (dfm) from hard coded options relevant to current project

get_dfm(
  dfm_file = "F:/hguillon/research/exploitation/R/latin_america/data/obj_dfm.Rds",

    corpus_file = "F:/hguillon/research/exploitation/R/latin_america/data/english_corpus.Rds",
  text_col = "raw"
)

Arguments

dfm_file

Path to a dfm file, if file exists, file is read, if not dfm is computed from corpus

corpus_file

path to a corpus data.frame with text in text column

text_col

text column in the corpus data.frame

Value

document-feature matrix extracted