How transform a list into a corpus in r?

筅森魡賤 提交于 2019-12-02 00:44:48

To solve this problem I just applied the as.VCorpus function of the tm package to the list I created before:

new_corpus <- as.VCorpus(new_list)

Check if the new object is a corpus:

class(new_corpus)
[1] "VCorpus" "Corpus" 

I thus created a "volatile corpus". As written in the R documentation:

A volatile corpus is fully kept in memory and thus all changes only affect the corresponding R object.

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