0

I am new to R.I am trying to know about Corpus() method.

This is the code i wrote.

library(tm)
my_obj<-"learning about corpus method"
corp<-Corpus(VectorSource(my_obj))
corp

I thought the output of this code should be the structured text that is prepared by the Corpus method. But the output is :-

<<VCorpus>>
Metadata:  corpus specific: 0, document level (indexed): 0
Content:  documents: 1

Can someone explain what corpus method does in R ?

m-dz
  • 2,342
  • 17
  • 29
asad_hussain
  • 1,959
  • 1
  • 17
  • 27
  • 2
    See http://stackoverflow.com/questions/30435054/how-to-show-corpus-text-in-r-tm-package – m-dz Feb 12 '17 at 14:04

1 Answers1

0

the Corpus method make a collection of texts(called corpus in NLP), that enable user to use lots of text mining functions on it, for example tm-map function can remove punctuation, stop words, space, numbers ... , and you can count term frequency of each document in a corpus by using DocumentTermMatix function on corpus.

M.Rabiei
  • 11
  • 2