全部版块 我的主页
论坛 提问 悬赏 求职 新闻 读书 功能一区 经管百科 爱问频道
853 0
2016-03-12
各位大侠好,请问一下在用R语言做文本矩阵时,dtm<-DocumentTermMatrix(corpus,control=list(wordLengths = c(2, Inf)))

问什么会出现错误: 不是所有的inherits(doc, "TextDocument")都是TRUE



这是个什么情况啊,跪求各位大侠
这是我的程序:
corpus<-Corpus(VectorSource(Doc$text))
corpus<-tm_map(corpus,removeNumbers)
corpus<-tm_map(corpus,removePunctuation)
corpus<-tm_map(corpus,stripWhitespace)
corpus<-tm_map(corpus,segmentCN)#这里我用了Rwordseg包进行了分词
dtm<-DocumentTermMatrix(corpus,control=list(wordLengths = c(2, Inf)))


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群