Analyzing linguistic data, and programming for linguists

Spring 2022 | Instructor: Katrin Erk| TTH 11-12:30 | Hybrid: zoom, and WAG 208 | Canvas

Course Overview

Today, huge amounts of text are available in electronic form. We can poke these electronic text collections to answer questions about language -- and questions about the people who use it. For example, we can test whether passive constructions are increasingly falling out of favor in English, and we can trace how words change their meaning over time. We can also study a politician's word choices in political debates to find out more about their personality, or we can see how inaugural addresses have changed over time. 

This course provides a hands-on introduction to working with text data. This includes an introduction to programming in Python, with a focus on text processing and data exploration, with a "cookbook" of programming examples that will enable you very quickly to analyze texts on your own. Most of the conclusions that we want to draw from text are "risky conclusions", they are trends rather than yes-or-no answers, so the course also includes an introduction to statistical techniques for data exploration and for making and assessing "risky conclusions". The course also includes a course project where you can test your text analysis skills on a question of your own choice.

Prerequisites: Upper-division standing. 

Flags: Quantitatve, Independent Inquiry


P. R. Hinton (2004): Statistics Explained: A Guide for Social Science Students. Psychology Press; 3rd edition, 2014

Additional readings will be made available for download from the course website.

In Spring 2022, this course is hybrid. More information below!


Course information

Instructor Contact Information




Upper-division standing.

Syllabus and text

This page serves as the syllabus for this course.


P. R. Hinton: Statistics Explained: A Guide for Social Science Students. Psychology Press; 3rd edition.

Additional readings will be made available for download from the course website, in the course schedule. 

Content overview

There are immense amounts of text data available in electronic form. And there are many questions that these texts could help us answer. Some of these questions are about people, how they feel, what opinions they express, what topics they talk about. Other questions are about language itself: how language is changing over time, how people use particular grammatical constructions, or what kinds of connotations words carry with them.  The aim of this course is to give you the tools to automatically analyze texts to explore these kinds of questions. 

By the end of this course, you will 

A detailed schedule for the course, with topics for each lecture, is available in the Schedule section. 


This course carries the Quantitative Reasoning flag. Quantitative Reasoning courses are designed to equip you with skills that are necessary for understanding the types of quantitative arguments you will regularly encounter in your adult and professional life. You should therefore expect a substantial portion of your grade to come from your use of quantitative skills to analyze real-world problems.

This course also carries the Independent Inquiry flag. Independent Inquiry courses are designed to engage you in the process of inquiry over the course of a semester, providing you with the opportunity for independent investigation of a question, problem, or project related to your major. You should therefore expect a substantial portion of your grade to come from the independent investigation and presentation of your own work.

Course requirements and grading policy

Course projects should be done by teams of 2 students. Projects done by 1 or 3 students are only possible with prior approval of the instructor.

Project presentations will be in the final week of classes, in the order given on the schedule page (which will be generated via Python's random.shuffle()). If possible, all members of a project team should get some time to speak.

Assignments will be updated on Canvas. A tentative schedule for the entire semester is posted in the Schedule section. Readings may change up one week in advance of their due dates.

This course does not have a midterm or final exam.

Options for course projects, and more details on the project requirements are listed in the Project section.

The course will use plus-minus grading, using the following scale (showing Grade and Percentage):

Attendance is not required. However, given that we will do a lot of hands-on exercises in class, and the homework assignments and the project address the material covered in class, good attendance is essential for doing well in this class.

Extension Policy

If you turn in your assignment late and we have not agreed on an extension beforehand, expect points to be deducted. Extensions will be considered on a case-by-case basis. I urge you to let me know if you are in need of an extension, such that we can make sure that you get the time necessary to complete the assignments.

If an extension has not been agreed on beforehand, then for assignments, by default, 5 points (out of 100) will be deducted for lateness, plus an additional 1 point for every 24-hour period beyond 2 that the assignment is late.

Note that there are always some points to be had, even if you turn in your assignment late. The last day in the semester on which the class meets is the last day to turn in late assignments for grading. Homework assignment submitted after that date will not be graded.

Classroom safety and Covid-19

To help preserve our in person learning environment, the university recommends the following.

Academic Dishonesty Policy

You are encouraged to discuss assignments with classmates. But all written work must be your own. Students caught cheating will automatically fail the course. If in doubt, ask the instructor.

Notice about students with disabilities

The University of Texas at Austin provides upon request appropriate academic accommodations for qualified students with disabilities. Please contact the Division of Diversity and Community Engagement, Services for Students with Disabilities, 471-6259.

Notice about missed work due to religious holy days

A student who misses an examination, work assignment, or other project due to the observance of a religious holy day will be given an opportunity to complete the work missed within a reasonable time after the absence, provided that he or she has properly notified the instructor. It is the policy of the University of Texas at Austin that the student must notify the instructor at least fourteen days prior to the classes scheduled on dates he or she will be absent to observe a religious holy day. For religious holy days that fall within the first two weeks of the semester, the notice should be given on the first day of the semester. The student will not be penalized for these excused absences, but the instructor may appropriately respond if the student fails to complete satisfactorily the missed assignment or examination within a reasonable time after the excused absence.

Emergency Evacuation Policy

Occupants of buildings on The University of Texas at Austin campus are required to evacuate buildings when a fire alarm is activated. Alarm activation or announcement requires exiting and assembling outside. Familiarize yourself with all exit doors of each classroom and building you may occupy. Remember that the nearest exit door may not be the one you used when entering the building. Students requiring assistance in evacuation shall inform their instructor in writing during the first week of class. In the event of an evacuation, follow the instruction of faculty or class instructors. Do not re-enter a building unless given instructions by the following: Austin Fire Department, The University of Texas at Austin Police Department, or Fire Prevention Services office. Information regarding emergency evacuation routes and emergency procedures can be found at

Senate Bill 212 and Title IX Reporting Requirements

Under Senate Bill 212 (SB 212), the professor and TAs for this course are required to report for further investigation any information concerning incidents of sexual harassment, sexual assault, dating violence, and stalking committed by or against a UT student or employee. Federal law and university policy also requires reporting incidents of sex- and gender-based discrimination and sexual misconduct (collectively known as Title IX incidents). This means we cannot keep confidential information about any such incidents that you share with us. If you need to talk with someone who can maintain confidentiality, please contact University Health Services (512-471-4955 or 512-475-6877) or the UT Counseling and Mental Health Center (512-471-3515 or 512-471-2255). We strongly urge you make use of these services for any needed support and that you report any Title IX incidents to the Title IX Office.

Adapting the class format to deal with the ongoing pandemic


This schedule is subject to change.

Assignments are due at the end of the day on their due date. Please submit assignments online on Canvas unless the assignment tells you otherwise.

Readings can be done either before or after class (unless noted otherwise); they are chosen to support the material covered in class.

Week 1: Jan 18, 20: Introduction this week completely online

Week 2: Jan 25, 27: Exploring and visualizing data This week completely online

Week 3: Feb 1, 3: Python basics .Tuesday session this week in person

Week 4: Feb 8, 10: Python basics.  Both sessions this week in person. 

Week 5: Feb 15, 17: Word counting Both sessions this week in person. 

Week 6: Feb 22, 24: Tools for text processing

Week 7: Mar 1, 3: More text processing, and Advanced analysis methods

Week 8: Mar 8, 10: Descriptive statistics

Week 9: Spring Break

Week 10: Mar 22, 24: Hypothesis testing

Week 11: Mar 29, 31: Hypothesis testing

Week 12: Apr 5, 7: More programming

Week 13: Apr 12, 14: Correlation and regression

Week 14: Apr 19, 21: Correlation and regression

Week 15: Apr 26, 28: Practicing regression

Week 16: May 3, 5: Project presentations

Final report due: May 11, end of day.

Course project information

Course project links

Here are links related to the course project ideas that you mentioned in class:

Course project requirements

Course projects should be done by teams of 2 students. Project groups consisting of 1 or 3 students are possible only with prior approval of the instructor.

Initial project description

This is a 1-2 page document (single-spaced, single column) that describes what your project will be about. It needs to contain the following information:

Intermediate report

This is a 1-2 page document (single-spaced, single column) that describes what the status of your project is at this point. This is a revised version of your initial project description. It needs to contain the following information:

You also need to take into account the feedback that you got on the Initial project description.

Short presentation

This is a short presentation to the class. You should discuss:

You will need to prepare slides for this, which you submit to the instructor ahead of time.

It is okay if you don't have all results in place at this point. This does not lead to points being taken away for the presentation.

Final report

This is a 5-6 page document (single-spaced, single column) that describes the results of your project. This is a revised version of your intermediate project description. It needs to contain the following information:

If you build on previous work, you need to discuss it, and give references. Published papers (at conferences, in journals) go into the references list at the end of the paper. Links to blog posts and the like go in a footnote. Also, links to websites containing data go in a footnote, not in the references list.

You need to take into account the feedback that you got on the Initial project description and Intermediate report.

Course project ideas

Ideally, you pick a topic of your own that you are curious about. But to give you an idea of possible topics, here are a few pointers:

Please discuss your topic with the instructor to make sure that it is both substantial and feasible.

For your course project, you will need to apply statistical analyses yourself. Google books n-gram charts, while pretty, do not count.

Links and additional readings

List of software we will use in the class

Python and Python packages:

To test your Python installation, use this Jupyter notebook.


We are using Slack for in-class discussions. Please see Canvas for the link to the class Slack space.

Tips and tricks:

Learning Python:

Jupyter notebooks:

Fun with statistics