Learn R Programming

CTM (version 0.2)

termCount: Term Count

Description

Computing term count from text documents

Usage

termCount(doc, EngTermDeleted = TRUE, NumTermDeleted = TRUE, shortTermDeleted = TRUE)

Arguments

doc
The Chinese text document.
EngTermDeleted
remove English from text documents.
NumTermDeleted
remove Numbers from text documents.
shortTermDeleted
Deltected short word when nchar

Details

This function run a Chinese word segmentation by jiebeR and compute term count from all these text document.

Examples

Run this code
library(CTM)
a1 <- "hello taiwan"
b1 <- "world of tank"
c1 <- "taiwan weather"
d1 <- "local weather"
text1 <- t(data.frame(a1,b1,c1,d1))
count1 <- termCount(doc = text1, EngTermDeleted=FALSE, shortTermDeleted = FALSE)

Run the code above in your browser using DataLab