Programming in Python for Text Analysis

2026-2027

General Information

Course Code L_AAMPLIN021
Credits 6 EC
Period P1
Course Level 500
Language of Tuition English
Faculty Fac. of Social Sciences and Humanities
Course Coordinator dr. L.G. de Passos Morgado da Costa BA
Examiner dr. L.G. de Passos Morgado da Costa BA
Teaching Staff dr. L.G. de Passos Morgado da Costa BA
Part of programme(s)

Practical Information

You need to register for this course yourself. The (de)registration deadlines can be found on VU.nl

Teaching Methods Seminar, Written partial exam

Target audiences

This course is also available as:

Course Objective

This course is meant to introduce you to the basics of the Python programming language. There is a lot to discover about Python and programming in general, and you will probably learn something new every day if you continue programming after this course. In the master-level version of the course, our goal for you is to become an independent programmer who is able to find solutions to new problems.

Knowledge and comprehension: in the first half of the course, you will:

  • Become familiar with the basics of python syntax and the basic data types in python
  • Learn how to use basic python tools to work with and manipulate the basic data types in the Python Standard Library

Application: In the second half of the course, you will:

  • Learn how to apply your knowledge to deal with different file types (e.g., plain text, CSV/TSV, JSON)
  • Learn how to use external libraries for text analysis
  • Learn how to explain your code and results to others by documenting it so it can be shared

Analysis: Throughout the entire course, you will develop the following skills:

  • Learn how to analyze (and debug) your own code and other people’s code
  • Learn how to analyze a complex problem (e.g. how to extract information from a complicated data structure)
  • Learn how to divide a problem into small and manageable sub-problems
  • Learn how to structure your code around small, self-contained, and understandable modules

Synthesis: At the end of the course, you will:

  • Be able to structure your own, small programming projects
  • Be ready to learn how to work with new libraries we have not covered in the course
  • Be able to continue to develop as a programmer in an independent and self-guided manner

We will focus on readability and understandability so that you will be able to share your code and results with others, and re-use your code in the future. This is a practical course, in which you will get a lot of hands-on experience. Due to the nature of this course, active participation is required.

Course Content

During this course, you will learn how to analyze text data using the Python programming language. No programming knowledge is required; we believe that anyone can learn how to program. You will learn how to extract information from text corpora; deal with different file types (plain text, CSV, JSON). We will focus on readability and understandability of your code so that you will be able to share it with others, and reuse your code in the future.

Additional Information Teaching Methods

The course is organized in blocks. Blocks typically follow this routine: -Lecture 1: introduction of concepts in the form of an (interactive) lecture. Students are expected to have worked through preparatory exercises and ask questions in class. -Lecture 2: The lecturer focuses on dedicating time to more difficult concepts from the block. If there is enough time, students can already start working on the assignment. Students will have the opportunity to ask for help and clarification. The deadline for an assignment is typically soon after this lecture. -Lecture 3: This lecture is a feedback session. The lecturer provides general feedback about the submitted assignments.

Method of Assessment

Assessment has three components:

  1. Mid-term Exam (25%): This exam tests basic concepts concepts in blocks 1 and 2. These concepts are the foundation of blocks 3 and 4. To pass this course, you need a passing grade (at least 5.5).
  2. An individual python assignment done in class (25%): This assignment tests the course content from a practical perspective. To pass this course, the assignment needs a passing grade (at least 5.5).
  3. Final exam (50%): The final exam is designed to test your knowledge of Python. To pass this course, you need a passing grade (at least 5.5).

Literature

To be announced on Canvas. All materials are freely available online (https://github.com/cltl/python-for-text-analysis).

Additional Information Target Audience

Master students

Additional Information

Students need a computer with access to the command line to complete this course. Usually, any working computer (laptop) is sufficient. Note: tables, phones, and netbooks are usually not sufficient.

Recommended background knowledge

There are no prerequistits to take this course but an interest in text analysis is recommended.