Text Mining with Bag-of-Words in R

Start Free Preview

Buying via our links supports this free directory · Affiliate disclosure.
Course facts
  • Payment: Free Preview (Paid Upgrade)
  • Learning style: Self-paced, start anytime
  • Format: Text & Interactive
  • Video access: Streaming Only
  • Before you start: Intermediate R
DataCamp details
  • Chapters: 4
Available onDataCamp

Course Details
Learning Style

Start Anytime

Level

Intermediate

Study Mode

100% Online

Duration

Short (< 10 Hours)

Languages
Audio Language

English

Outcomes
Certificate

Certificate of Completion

Price & Terms
Pricing Model

Free Preview (Paid Upgrade)

Technical
Content Medium

Text & Interactive

Video Access

Streaming Only

Specification
Access

Subscription

Clean and count text in R with the bag-of-words method, build word clouds and dendrograms, then analyze employee reviews in a case study.

At a glance
Duration4 hrs
LevelIntermediate
CertificateCertificate of Completion
LanguageEnglish
Taught byTed Kwartler
AccessSubscription
Add your review
Add to wishlistAdded to wishlistRemoved from wishlist 0

Text mining with the bag-of-words method turns unstructured text into word counts that can be measured and compared, setting aside the order in which the words appear. Working in R, you prepare a corpus with the tm and qdap packages, build term-document and document-term matrices, and read the results through word clouds and dendrograms. Employee reviews of Amazon and Google then serve as the text for an HR analytics question.

What You Will Achieve

  • Turn raw text from a vector or data frame into a clean corpus and count how often each term appears.
  • Design word clouds and word networks that show what two sets of documents share and what sets them apart.
  • Cluster related terms into a dendrogram and look past single words with bigrams and adjusted frequency weights.
  • Plan and run a text mining project on employee reviews, ending with HR analytics insights.


Program Overview

Bag-of-Words Basics and Text Preprocessing

Starts with what text mining is and how raw text becomes a corpus that is ready for counting.

  • Building a VCorpus from a vector or a data frame
  • Cleaning functions in tm and qdap
  • Stop words, word stemming and stem completion
  • Term-document and document-term matrices

Word Clouds, Word Networks and Clustering

Turns frequent terms into visuals, then extends the bag of words with clustering, associations and multi-word tokens.

  • Frequent terms, word cloud colors and prebuilt palettes
  • Common and dissimilar words, polarized tag clouds and word networks
  • Distance matrices, dendrograms and word association
  • N-gram tokenization, frequency weights and metadata in tm

HR Analytics Case Study on Amazon and Google Reviews

Applies the full workflow to employee reviews of two tech companies, following the steps of an organized text mining project.

  • Problem definition and identifying the text sources
  • Text organization, feature extraction and analysis of pros and cons
  • Comparing positive and negative reviews
  • Reaching conclusions and recommendations

Certificate Awarded (Paid)


Job Outlook

Bag-of-words text mining in R is used wherever large amounts of unstructured text need to be summarized and compared, such as employee reviews studied for HR analytics.


Our take

Good for: R users who want a code-based workflow for cleaning, counting and visualizing text, and who like finishing with a complete worked case.

Keep in mind: Bag-of-words counts words and sets their order aside, with n-grams as the main way past single words; the exercises run on the tm and qdap packages.

Bottom line: A tm and qdap based course that closes by setting Amazon and Google employee reviews against each other.

Frequently Asked Questions

What is the bag-of-words method?

It represents a piece of text by how often each word appears and sets aside the order the words come in. That count is the basis for every matrix, word cloud and cluster built in the course.

Which R packages do the exercises use?

The text work centers on the tm and qdap packages, used for cleaning text, removing stop words, stemming and finding frequent terms. The tm package also builds the term matrices and stores document metadata.

What data does the case study analyze?

The final chapter works with employee reviews of Amazon and Google, split into pros and cons. You organize the text, extract features, compare positive and negative reviews of the two companies, and draw conclusions for an HR analytics question.

How do n-grams change the analysis?

Tokenizing text into n-grams lets the matrices count word pairs such as bigrams instead of single words only. One lesson looks at how bigrams change the word clouds built from the same text.

User Reviews

0.0 out of 5
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0

No reviews yet. Be the first to review this course.

There are no reviews yet.

Write your review

Reviews can only be posted by registered learners. Log in, then you will return here to post.

×
Report this page
Text Mining with Bag-of-Words in R
Text Mining with Bag-of-Words in R
LiveTalent
Logo