cltl/python-for-text-analysis

If you want to use Python for text analysis, this course is for you!

What it solves

This project provides the teaching materials for a university course that introduces students to Python programming for working with language data. It addresses the need for humanities and linguistics students to gain hands-on, practical programming skills without any prior coding experience, enabling them to analyze texts, handle various file formats, and share their code and results.

How it works

The course is structured around four blocks, each combining interactive Jupyter notebook chapters (in the Chapters folder) with assignments (in the Assignments folder) that students complete and self-grade. The material covers Python basics, the standard library, working with plain text, CSV/TSV, and JSON files, and using external libraries for text analysis. Extra materials and datasets are provided in separate folders. Students are expected to prepare before lectures, work through assignments in stages, and attend feedback sessions. The course also includes midterm and final exams, and it explicitly discourages the use of generative AI to ensure genuine learning.

Who it’s for

This is designed for students enrolled in specific Humanities and Linguistics programs at Vrije Universiteit Amsterdam, including the Humanities Research Master: Linguistics (Human Language Technology track), the Linguistics Master: Language and AI, and the Minor Digital Humanities and Social Analytics. No prior programming knowledge is required, making it suitable for humanities students new to coding.

Highlights

  • Beginner-friendly: Assumes no programming background; works with Python 3.12+ and Jupyter Notebook.
  • Structured blocks: Four blocks with chapters, assignments, and feedback sessions to build skills progressively.
  • Self/auto-graded assignments: Assignments help prepare for exams and reinforce learning, though they don't directly count toward the final grade.
  • Focus on readable and shareable code: Emphasizes documentation and reusability, grounded in principles like approachability and consistency from Mike Bostock's 'What makes software good?'.

Related

  • Project
  • Project
  • Project
  • Project