Learn R Programming

textreg

textreg CRAN package

Copy Link

Version

Install

install.packages('textreg')

Monthly Downloads

670

Version

0.1.5

License

MIT + file LICENSE

Maintainer

Luke Miratrix

Last Published

October 4th, 2018

Functions in textreg (0.1.5)

make.path.matrix

Generate matrix describing gradient descent path of textreg.
cpp_textreg

Driver function for the C++ function.
make.count.table

Count number of times documents have a given phrase.
make.list.table

Collate multiple regression runs.
make_search_phrases

Convert phrases to appropriate search string.
path.matrix.chart

Plot optimization path of textreg.
textreg-package

Sparse regression package for text that allows for multiple word phrases.
convert.tm.to.character

Convert tm corpus to vector of strings.
testCorpora

Some small, fake test corpora.
textreg

Sparse regression of labeling vector onto all phrases in a corpus.
find.threshold.C

Conduct permutation test on labeling to get null distribution of regularization parameter.
tm_gregexpr

Call gregexpr on the content of a tm Corpus.
grab.fragments

Grab all fragments in a corpus with given phrase.
calc.loss

Calculate total loss of model (Squared hinge loss).
clean.text

Clean text and get it ready for textreg.
make.CV.chart

Plot K-fold cross validation curves
phrase.count

Count phrase appearance.
bathtub

Sample of cleaned OSHA accident summaries.
phrases

Get the phrases from the textreg.result object?
plot.textreg.result

Plot the sequence of features as they are introduced with the textreg gradient descent program.
phrase.matrix

Make matrix of where phrases appear in corpus.
sample.fragments

Sample fragments of text to contextualize a phrase.
reformat.textreg.model

Clean up output from textreg.
make.appearance.matrix

Make phrase appearance matrix from textreg result.
make.phrase.matrix

Make a table of where phrases appear in a corpus
predict.textreg.result

Predict labeling with the selected phrases.
print.textreg.corpus

Pretty print textreg corpus object
make.similarity.matrix

Calculate similarity matrix for set of phrases.
build.corpus

Build a corpus that can be used in the textreg call.
print.textreg.result

Pretty print results of textreg regression.
is.textreg.result

Is object a textreg.result object?
print.fragment.sample

Pretty print results of phrase sampling object.
list.table.chart

Graphic showing multiple word lists side-by-side.
find.CV.C

K-fold cross-validation to determine optimal tuning parameter
cluster.phrases

Cluster phrases based on similarity of appearance.
is.fragment.sample

Is object a fragment.sample object?
is.textreg.corpus

Is object a textreg.corpus object?
dirtyBathtub

Sample of raw-text OSHA accident summaries.
cpp_build.corpus

Driver function for the C++ function.
save.corpus.to.files

Save corpus to text (and RData) file.
stem.corpus

Step corpus with annotation.
make.phrase.correlation.chart

Generate visualization of phrase overlap.