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.).

http://www.sthda.com/english/wiki/text-mining-and-word-cloud-fundamentals-in-r-5-simple-steps-you-should-know

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.

Sincerely,

Ziad Elmously


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

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.