Python for the Language Sciences: An Introductory Course

Stuart Robinson and Harald Baayen

Description

This course will be an intensive introduction to the Python programming language that is oriented towards language researchers (fieldworkers, linguists, psycholinguists, etc.). It presupposes only basic computer literacy. No previous programming experience is required.


Schedule

The course will meet 3 times per week for 2 weeks. Each session will last two hours (15.00 to 17.00).

First Week

Monday, 24 April: 15.00 - 17.00
Introduction, Programming for Language Research, First Program
Reading: Ch. 2, 3, 4

  1. What is Python?
  2. The Usefulnes of Programming for Language Research
  3. Installing Python
  4. Our First Program

Wednesday, 26 April: 15.00 - 17.00
Statements, Data Types, Data Structures
Reading: Ch. 5, 6, 7

  1. Variables
  2. Simple Statements
  3. Data Typing: Strings, Numbers, None
  4. Data Structures: Lists and Tuples

Friday, 28 April: 15.00 - 17.00
Data Flow, Functions, Errors and Exceptions
Reading: 8, 9, 10

  1. Conditional Statements: if-then
  2. Looping: while-loops, for-loops
  3. Functions: arguments and return values
  4. Errors and Exceptions

Second Week

Tuesday, 2 May: 15.00 - 17.00
Input/Output (IO), Strings in Depth, Sample Programs
Reading: Ch. 10, 13

  1. Input/Output: Reading from and Writing to Files
  2. Strings in Depth
  3. Sample Programs

Wednesday, 3 May: 17.00 - 18.30
Object-Oriented Programming, Regular Expressions
Reading: Ch. 14, 15, 16, 17

  1. Object-Oriented Programming: A Brief Introduction
  2. Regular Expressions: The Basics

Thursday, 4 May: 15.00 - 17.00
Modules and Packages
Python for CELEX and Shoebox
Reading: Ch. 12

  1. Modules and Packages
  2. A Python interface to CELEX
  3. Parsing Shoebox with the NLTK

Course Material

The main course material will be a textbook under development by Robinson and Baayen, tentativley titled An Introduction to Python Programming for Language Research. Email stuart-AT-zapata-DOT-org if you would like a copy of the textbook and the associated example code.


Course Information

Information about the course will be posted to the MPI mailing list python. To subscribe, send an email message to majordomo AT mpi DOT nl with no header and only the following as content:

subscribe python

Python Links

For Python links, go here.