makeDTM: makeDTM

Description Usage Arguments Value Examples

Description

make DTM

Usage

1
2
makeDTM(docs, key = "all", LABEL = FALSE, weight = "tf",
  TEXT.name = NULL, LABEL.name = NULL, RHINO = FALSE, pos = "ALL")

Arguments

docs

dataframe. Every row is document.

key

character. Vector type Keywords. if none, all words would be keywords.

LABEL

logical. In need of LABEL column.

weight

character. tf or tfidf

TEXT.name

character. Column name which whould be TEXT.

LABEL.name

character. Column name which would be LABEL.

RHINO

logical. In need of morphological anaysis about TEXT column.

pos

character. ALL(all Part-Of-Speech), noun(NNG, NNP, NP), verb(VV, VA, XR), NV(noun, verb), END(EC, EF), NNG, NNP, NP, NNB, VV, VA, XR, VX, EC, EF, EP

Value

matrix or dataframe(if LABEL=TRUE)

Examples

1
2
3
makeDTM(docs = docs, key = c("excel", "computer"), pos="noun")
makeDTM(docs = docs, key = c("excel", "computer"), LABEL = TRUE, weight = "tfidf", TEXT.name="body", LABEL.name="tag", pos="verb")
makeDTM(docs = docs, key = c("excel", "computer"), weight = "tfidf", TEXT.name="body", LABEL.name="tag", pos="verb")

caitechKHU/makeDTM documentation built on May 13, 2019, 2:59 a.m.