Introduction to Text Classification in R with quanteda

提供方
Coursera Project Network
在此指导项目中,您将:

Import text documents, reshape texts from documents to paragraphs, and turn your texts into a machine readable format.

Classify presidential concession speeches by political party using a Naive Bayes algorithm and assess the accuracy of the predictions.   

Clock2 hours
Beginner初级
Cloud无需下载
Video分屏视频
Comment Dots英语(English)
Laptop仅限桌面

In this guided project you will learn how to import textual data stored in raw text files into R, turn these files into a corpus (a collection of textual documents), reshape them into paragraphs from documents and tokenize the text all using the R software package quanteda. You will then learn how to classify the texts using the Naive Bayes algorithm. This guided project is for beginners interested in quantitative text analysis in R. It assumes no knowledge of textual analysis and focuses on exploring textual data (US Presidential Concession Speeches). Users should have a basic understanding of the statistical programming language R.

您要培养的技能

  • Ordered Pair
  • Text Analysis
  • Algorithms
  • Statistical Programming Languages
  • Computer Programming

分步进行学习

在与您的工作区一起在分屏中播放的视频中,您的授课教师将指导您完成每个步骤:

  1. Load text documents into R studio, convert a number of text documents into a corpus, and extract data from text document file names and add them to a new column in a dataframe. 

  2. Reshape the dataset into paragraphs from documents and check for balance in your labels. 

  3. Split up a text document corpus into tokens, or individual words and punctuations. Then clean the data by removing specific words and spellings.

  4. Create a Document Feature Matrix, divide it into train and test sets and run a Naive Bayes model. Then examine the model’s prediction accuracy and learn about accuracy, precision, and recall.   

  5. Run Naive Bayes models for a second and third time. Then examine the models' predictions and compare the model outputs with results from the previous task.

指导项目工作原理

您的工作空间就是浏览器中的云桌面,无需下载

在分屏视频中,您的授课教师会为您提供分步指导

常见问题

常见问题

还有其他问题吗?请访问 学生帮助中心