Python Programming for Linguists
Department of English,
National Taiwan Normal University
or, Why Programming for Linguists?
it’s just like second language acquisition ;-)
linguists are the best programmers ;-)
Linguistics 2.0: are you ready to be updated?
empiricalistic,data-oriented, so what?
it’s quite diﬀerent now. From corpus-based to
pattern mining/multilingual applications...)
IN ONE SENTENCE: transition from local data processing task to
global language resources collaboration work
because NASA, YouTube, Google like it?
free of charge? cross-platform?
okok, you need the true answer ? ...
The Philosophy Hidden Behind
(Perl)There’s More Than One Way To Do It.
(Python)Explicit is better than implicit, i.e., There should be one –
and preferably only one – obvious way to do it.
Some Technical Advantages
embeddable (e.g., RPy, Praat-Py)
NLTK: great modules for linguists
With Parrot, we maybe use all (Perl) modules for Python.
From small script (pattern extraction, frequency, etc) to bigger
linguistic applications (Word Sketch Engine).
Start from existing Corpus tools written in Python (e.g., TextSTAT)
Getting oﬀ the ground
1. Download python and install,
2. Using the interpreter prompt IDLE, and/or
3. Choosing an Editor (e.g.,Kate for linux).
Note: need to script KATE to automagically Compile/Execute Programs