postwar <- dfm_trim(dfm(data_corpus_inaugural[41:57]), min_count = 5, min_docfreq = 2)
mod <- textmodel(postwar, model = "wordfish")
textplot_scale1d(mod, sort = FALSE)
textplot_scale1d(mod, sort = TRUE)
textplot_scale1d(mod, margin = "features",
highlighted = c("government", "countries", "children",
"the", "nuclear", "federal"))
Run the code above in your browser using DataLab