Python for Linguists
This draft manuscript is an introductory Python tutorial for linguists. The book covers the rudiments of Python programming, writing simple programs for corpus linguistics, and writing programs for computational linguistics. The chapters are in PDF format and can be viewed and printed using the free program, Acrobat Reader.
I’m very interested in getting your comments. In addition, if you are having problems with some aspect of Python, and you want some help, please send me email (ron.zacharski_AT_gmail.com)
I would like to acknowledge Steve Bethard (http://ucsu.colorado.edu/~bethard/) who graciously helped in a recent edit of these chapters.
This draft is not connected in any way to O’Reilly Media.
Currently available tutorials
To save the file to your computer, right mouse click on the link and select ’save as’.
1. Installing Python and getting it to run
2. Basic Python Programming: Lists and defining functions
3. Basic Python Programming: For loops and reading files
4. Basic Python Programming: Practice
5. Python Dictionaries
6. Corpus tools
…
Files referenced in tutorials
Chapter 1
healthy_linguist.py (To download using a Windows machine, right-click on the link and chose ‘Save Target As …’)
Chapter 2
Chapter 3
1. Initial.txt (To download using a Windows machine, right-click on the link and chose ‘Save Target As …’)
2. Subject.txt
3. Verbal.txt
Chapter 4
1. harryPotter.txt
2. text file of Peter Pan
3. addresses.txt