The TDM & DTM

Text Mining with Bag-of-Words in R

Ted Kwartler

Instructor

TDM vs. DTM

tdm:dtm.png

# Generate TDM
coffee_tdm <- TermDocumentMatrix(clean_corp)

# Generate DTM coffee_dtm <- DocumentTermMatrix(clean_corp)
Text Mining with Bag-of-Words in R

Word Frequency Matrix (WFM)

# Load qdap package
library(qdap)

# Generate word frequency matrix coffee_wfm <- wfm(coffee_text$text)

wfm.png

Text Mining with Bag-of-Words in R

Let's practice!

Text Mining with Bag-of-Words in R

Preparing Video For Download...