How to show corpus text in R tm package?

前端 未结 8 818
一个人的身影
一个人的身影 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")
    
    0 讨论(0)
  • 2020-12-15 00:17

    I had the same issue, and corpus[[1]]$content worked for me

    0 讨论(0)
提交回复
热议问题