RDocumentation
Moon
Learn R
Search all packages and functions
⚠️
There's a newer version (0.1.5) of this package.
Take me there.
textreg (version 0.1.2)
n-gram Text Regression, aka Concise Comparative Summarization
Description
Function for sparse regression on raw text, regressing a labeling vector onto a feature space consisting of all possible phrases.
Copy Link
Copy
Link to current version
Version
Version
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
Down Chevron
Install
install.packages('textreg')
Monthly Downloads
483
Version
0.1.2
License
GPL (>= 2)
Maintainer
Luke Miratrix
Last Published
February 6th, 2015
Functions in textreg (0.1.2)
Search functions
convert.tm.to.character
Convert tm corpus to vector of strings.
save.corpus.to.files
Save corpus to text (and RData) file.
stem.corpus
Step corpus with annotation.
build.corpus
Build a corpus that can be used in the textreg call.
cpp_build.corpus
Driver function for the C++ function.
make.list.table
Collate multiple regression runs.
make.path.matrix
Generate matrix describing gradient descent path of textreg.
make.phrase.correlation.chart
Generate visualization of phrase overlap.
print.fragment.sample
Pretty print results of phrase sampling object.
dirtyBathtub
Sample of raw-text OSHA accident summaries.
make.CV.chart
Plot K-fold cross validation curves
find.threshold.C
Conduct permutation test on labeling to get null distribution of regularization parameter.
is.textreg.result
Is object a textreg.result object?
phrase.matrix
Make matrix of where phrases appear in corpus.
make.similarity.matrix
Calculate similarity matrix for set of phrases.
reformat.textreg.model
Clean up output from textreg.
sample.fragments
Sample fragments of text to contextualize a phrase.
bathtub
Sample of cleaned OSHA accident summaries.
plot.textreg.result
Plot the sequence of features as they are introduced with the textreg gradient descent program.
find.CV.C
K-fold cross-validation to determine optimal tuning parameter
list.table.chart
Graphic showing multiple word lists side-by-side.
phrase.count
Count phrase appearance.
grab.fragments
Grab all fragments in a corpus with given phrase.
tm_gregexpr
Call gregexpr on the content of a tm Corpus.
calc.loss
Calculate total loss of model (Squared hinge loss).
testCorpora
Some small, fake test corpora.
clean.text
Clean text and get it ready for textreg.
is.textreg.corpus
Is object a textreg.corpus object?
print.textreg.corpus
Pretty print textreg corpus object
make.phrase.matrix
Make a table of where phrases appear in a corpus
cluster.phrases
Cluster phrases based on similarity of appearance.
textreg
Sparse regression of labeling vector onto all phrases in a corpus.
print.textreg.result
Pretty print results of textreg regression.
is.fragment.sample
Is object a fragment.sample object?
predict.textreg.result
Predict labeling with the selected phrases.
textreg-package
Sparse regression package for text that allows for multiple word phrases.
cpp_textreg
Driver function for the C++ function.
make_search_phrases
Convert phrases to appropriate search string.
make.count.table
Count number of times documents have a given phrase.
make.appearance.matrix
Make phrase appearance matrix from textreg result.
path.matrix.chart
Plot optimization path of textreg.