Learn R Programming

fdm2id (version 1.0.1)

TEXTMINING: Text mining

Description

Apply data mining function on vectorized text

Usage

TEXTMINING(corpus, miningmethod, vector = c("docs", "words"), ...)

Value

The result of the data mining method.

Arguments

corpus

The corpus.

miningmethod

The data mining method.

vector

Indicates the type of vectorization, documents (TF-IDF) or words (GloVe).

...

Parameters passed to the vectorisation and to the data mining method.

See Also

predict.textmining, textmining-class, vectorize.docs, vectorize.words

Examples

Run this code
# \donttest{
require (text2vec)
# A small subset of movie_review is used here so this example runs quickly.
data ("movie_review")
d = movie_review [1:300, 2:3]
d [, 1] = factor (d [, 1])
d = splitdata (d, 1)
model = TEXTMINING (d$train.x, NB, labels = d$train.y, mincount = 10)
pred = predict (model, d$test.x)
evaluation (pred, d$test.y)
data (capitals)
clusters = TEXTMINING (capitals, HCA, vector = "words", k = 5, mincount = 2, ndim = 10, maxiter = 5)
plotclus (clusters$res, capitals, type = "tree", labels = TRUE)
# }

Run the code above in your browser using DataLab