# use Lenihan for govt class and Bruton for opposition
library("quanteda")
docvars(data_corpus_irishbudget2010, "govtopp") <- c("Govt", "Opp", rep(NA, 12))
dfmat <- dfm(tokens(data_corpus_irishbudget2010))
tmod <- textmodel_svmlin(dfmat, y = dfmat$govtopp)
predict(tmod)
Run the code above in your browser using DataLab