To install this package, use the following, which also installs what the R keras package needs in order to run.
# devtools package required to install quanteda from Github
devtools::install_github("quanteda/quanteda.classifiers")
keras::install_keras(method = "conda")
This package contains two experimental methods that are built on top of the keras package. (The SVM models have been moved to quanteda.textmodels.)
Classifier | Command |
---|---|
Multilevel perceptron network | textmodel_mlp() |
Convolutional neural network + LSTM model fitted to word embeddings | textmodel_cnnlstmemb() |
Corpus | Name |
---|---|
Sentence-level corpus of UK party manifestos 1945–2019, partially annotated | data_corpus_manifestosentsUK |
Large Movie Review Dataset of 50,000 annotated highly polar movie reviews for training and testing, from Maas et. al. (2011) | data_corpus_LMRD |
See this (very preliminary!) performance comparison.
Benoit, Kenneth, Patrick Chester, and Stefan Müller (2019). quanteda.classifiers: Models for supervised text classification. R package version 0.2. URL: http://github.com/quanteda/quanteda.svm.
For a BibTeX entry, use the output from citation(package = “quanteda.classifiers”).
- Please file an issue (with a bug, wish list, etc.) via GitHub.