Python programming for linguists

These are the slides of two workshops I gave at DCU in August 2017.

25 Aug 2017: It seems that the site which retrieves the slides from github experiences some difficulties. For this reason you may get a “No definition found for Table headers” error. There are two solutions: keep refreshing the page till the slides are eventually retrieved or download the slides (i.e. HTML files) from GitHub onto your computer and open them in your favourite browser. The problem with the later option is that you will not get any corrections that are committed to GitHub.

Part 1

1.1 Getting started

1.2 Data types and variables in python

1.3 Controlling the flow of the program

1.4 Lists and tuples

1.5 Functions

1.6 Dictionaries

1.7 Exceptions and files

Part 2

2.1 Recap and a few advanced bits

2.2 Introduction to NLTK

2.3 NLTK and WordNet

2.4 Regular expressions

2.5 XML processing

2.6 Processing information using APIs

For the exercise: list of questions

XML file produced by PET