Giter Site home page Giter Site logo

itaur-short's Introduction

Quantitative Text Analysis Using R

GESIS Computational Social Science Winter Symposium, Köln (Cologne), 1 December 2015

Kenneth Benoit, Department of Methodology, LSE
Paul Nulty, Department of Methodology, LSE

Version: 1 December 2015

This repository contains the workshop materials for the short workshop Quantitative to Text Analysis Using R taught on December 1, 2015 by Kenneth Benoit and Paul Nulty. This workshop is part of the pre-conference training sessions of the GESIS Computational Social Science Winter Symposium, 1-3 December 2015. Ken Benoit and Paul Nulty's involvement is supported through European Research Council grant ERC-2011-StG 283794-QUANTESS.

Instructions for using this resource

You have three options for downloading the course material found on this page:

  1. You can download the materials by clicking on each link.

  2. You can "clone" repository, using the buttons found to the right side of your browser window as you view this repository. This is the button labelled "Clone in Desktop". If you do not have a git client installed on your system, you will need to get one here and also to make sure that git is installed. This is preferred, since you can refresh your clone as new content gets pushed to the course repository. (And new material will get actively pushed to the course repository at least once per day as this course takes place.)

  3. Statically, you can choose the button on the right marked "Download zip" which will download the entire repository as a zip file.

You can also subscribe to the repository if you have a GitHub account, which will send you updates each time new changes are pushed to the repository.

Objectives

This workshop covers how to perform common text analysis and natural language processing tasks using R. When used properly, R is a fast and powerful tool for managing even very large text analysis tasks.

The course consists of instructor presentations in three sets, followed by exercises that students are meant to do in class. Computers should be available, but we suggest you bring your own.

We will cover how to format and input source texts, how to structure their metadata, and how to prepare them for analysis. This includes common tasks such as tokenisation, including constructing ngrams and "skip-grams", removing stopwords, stemming words, and other forms of feature selection. We show how to: get summary statistics from text, search for and analyse keywords and phrases, analyse text for lexical diversity and readability, detect collocations, apply dictionaries, and measure term and document associations using distance measures. Our analysis covers basic text-related data processing in the R base language, but most relies on the “quanteda” (https://github.com/kbenoit/quanteda) package for the quantitative analysis of textual data. We also cover how to pass the structured objects from quanteda into other text analytic packages for doing topic modelling, latent semantic analysis, regression models, and other forms of machine learning.

Prerequisites

While it is designed for those who have used R in some form previously, expertise in R is not required, and even those with no previous knowledge of R are welcome.

Part 1: Getting Started and Basic Text Analysis

Setting up RStudio and quanteda:

  • CRAN for downloading and installing R
  • GitHub page for the quanteda package
  • Additional packages to install: STM, topicmodels, glmnet
  • Configuration test: Try running this RMarkdown file: test_setup.Rmd. If it builds without error and looks like this, then you have successfully configured your system.

Basic Text Analysis:

Part 2: Descriptive text analysis using R

You also might want to look at the following:

Part 3: Advanced analysis and working with other text packages

Additional Resources

Designed to be done before the course or after, to augment what is presented during the course. These are just suggestions -- no reading for the course is required.

itaur-short's People

Contributors

kbenoit avatar pnulty avatar vaidasmo avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.