Tags / tm
Based on the provided specification, I'll write a complete R function that transforms a tdm matrix into a new matrix with an additional column representing the class of each term.
Understanding How to Remove Punctuation Marks in R's tm Package
Visualizing Combined Words with Word Clouds in R Using Quanteda