How to show corpus text in R tm package?

前端 未结 8 822
一个人的身影
一个人的身影 2020-12-14 23:49

I\'m completely new in R and tm package, so please excuse my stupid question ;-) How can I show the text of a plain text corpus in R tm package?

I\'ve loaded a corpu

8条回答
  •  既然无缘
    2020-12-15 00:12

    We can get the content of every item in the corpus.

    data("crude")
    out <- sapply(crude, function(x){x$content})
    out 
    
    # optionally export
    writeCorpus(out, "outputdir/", filenames = "corpus.txt")
    

提交回复
热议问题