To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
This chapter explains functions and modules. Functions perform some operation. They can operate directly on data or indirectly via other functions. All the niceties of different kinds of functions are explained. In addition, the topic treats the concept of modules, bits of code that are available to you or other programmers. The chapter shows how you can use existing modules in your own code and how you can write your own modules for others. Finally, the chapter goes into the proper way to document your functions and modules.
This chapter reviews the basic control structures of the Python language. These are used to lay out the logic of a program so as to allow it to do an infinite amount of stuff with finite means. These structures include if, for, while, etc.
This chapter outlines the book and lays out important preliminaries. First, it addresses why linguists need to know how to program. Second, it explains why Python is a good choice for a programming language. Third, it describes how this book is different from others. Finally, it outlines the text and explains how to get the most out of it.
This chapter covers how to get and use data from the internet. It covers methods for parsing webpages and for how to treat different character encodings. It also treats parallel processing to a certain extent as it has real consequences when dealing with remote data.
This appendix gives an overview of the Natural Language Toolkit (NLTK), a useful and widely used module for manipulating natural language data. The topics of corpora, tagging, and tokenizing are all covered.
This chapter introduces object-oriented programming and explains how to make use of it in Python. It covers the basic syntax of defining and using objects. It also introduces the object inheritance system and closes with an extended example of object-oriented syllable structure.
This chapter introduces input and output – how we get data into and out of our programs. The input modes include the command line, file input, pipes, and typed input. (A later chapter treats graphical user interface input.) The output modes include the command line, file output, and pipes.
This chapter covers graphical user interfaces (GUIs) using the tkinter module. The chapter starts with how to lay out a window and place user interface elements (widgets) in that window. It goes on to explain event-driven programming and how to attach basic functionality to widgets.
This chapter introduces the different data types of Python: integers, characters, strings, lists, dictionaries, tuples, etc. The chapter also treats the concept of mutability.
This chapter treats the general concept of pattern matching and the specific functions available to do this. In addition, the chapter explains the syntax of regular expressions, the notation used to describe the patterns we want to match.
This chapter covers the advanced topic of functional programming in Python, introducing the general notion of function programming and then the various tools available in Python to approximate it.
This chapter explains how to install Python and basic methods for interacting with the language: the interactive environment, Idle, programs executed on the command line, and Jupyter notebooks. The focus is on simple things one can do with Python in the interactive environment. The chapter concludes with several small programs that can be run at the command line.
Recommend this
Email your librarian or administrator to recommend adding this to your organisation's collection.