Python demonstration
code and text files
These files were prepared by Robert Staubs
for use in the UMass Linguistics Python
summer group, 2009. They accompanied the following texts:
http://www.zacharski.org/python2/
http://greenteapress.com/thinkpython/thinkpython.pdf
Example of
text processing using regular expressions:
File referred
to in script (see Pater 1997 on source):
Some
background on collection types we haven't touched on much (tuples,
dictionaries, sets):
Text we could
use with the above (Through the Looking Glass and What Alice Found There):
Random text
generation based on a bigram language model built from a corpus (incomplete)
Random text
generation based on a bigram language model built from a corpus (complete)
Syllabify a
word based on onset and nuclei rules
Build nonce
words based on bigram language model of phones (incomplete--requires NLTK
corpora)
Build nonce
words based on bigram language model of phones (complete--requires NLTK
corpora)
Skeleton
version of an object-oriented approach to segmental phonology to illustrate OO
concepts