LoslegenKostenlos loslegen

Sparse matrices

During the video lesson you learned about sparse matrices. Sparse matrices can become computational nightmares as the number of text documents and the number of unique words grow. Creating word representations with tweets can easily create sparse matrices because emojis, slang, acronyms, and other forms of language are used.

In this exercise you will walk through the steps to calculate how sparse the Russian tweet dataset is. Note that this is a small example of how quickly text analysis can become a major computational problem.

Diese Übung ist Teil des Kurses

Introduction to Natural Language Processing in R

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Tokenize and remove stop words
tidy_tweets <- russian_tweets %>%
  ___(word, content) %>%
  ___(stop_words)
# Count by word
unique_words <- tidy_tweets %>%
  count(___)
Code bearbeiten und ausführen