Weighting Document for Text Clouds

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Weighting Document for Text Clouds

Elmously, Ziad (TSHHM)
Hello All,

The link below shows the 5 steps required to build a text cloud from a text file of documents (e.g., posts, tweets, etc.).


The R script in the link loads the text into a character vector, "text".  Basically, it is a vector of documents.

Is there an easy way to apply document weights (if attached to the raw documents)?  The weighting options in the documentation for  "TermDocumentMatrix" do not seem to be relevant.  One option is to use the weights to physically replicate the documents in "text".

However, I seek a more elegant solution.


Ziad Elmously

Kantar Disclaimer<http://www.kantar.com/disclaimer.html>

        [[alternative HTML version deleted]]

[hidden email] mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.