2-gram and 3-gram instead of 1-gram using RWeka

梦想的初衷 提交于 2019-12-05 18:58:48
Frank Lin

I came across the same issue today. It seems "tm_map" is not working well with SimpleCorpus for some reasons.

I changed my code from

corpus = Corpus(VectorSource(pd_cmnt$QRating_Explaination))

to

corpus = VCorpus(VectorSource(pd_cmnt$QRating_Explaination))

And now it works and gives back 2-gram properly.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!