R/sentiment.topic.R

Defines functions cnsr.topic.word

Documented in cnsr.topic.word

### 2017年 02月 15日 星期三 10:26:13 CST ##########
### author: 李小丹(Li Shao Dan) 字 殊恒(shuheng)
### K.I.S.S
### S.P.O.T


cnsr.topic.word <- function(data, topicn = 3, topn = 10) {
	pos <- subset(data, sentiment == 1)
	neg <- subset(data, sentiment == 0)

	pos.res <- .lda.topic.word(pos, topicn, topn)
	neg.res <- .lda.topic.word(neg, topicn, topn)

	return(list(pos = pos.res, neg = neg.res))
}
leeshuheng/cnSentimentR documentation built on May 21, 2019, 3:05 a.m.