Python Tutorial
This tutorial introduces fundamental Python programming skills through hands-on work with text data. It starts with the basics of Python, then moves on to processing and analyzing linguistic corpora, and concludes with an introduction to key packages used in natural language processing. The materials are designed for LING 351 (Language Technology and LLMs) and LING 581 (Natural Language Processing I) at RIT, Fall 2025.
Basics
- Getting started
- Values, variables, functions, methods
- Strings, lists, conditional statement, loops
- Tuples, dictionaries, functions, classes, files
Text processing
Packages
References
While building this tutorial, I have referred to the following sources:
- Bird, S., Klein, E., & Loper, E. (2009). Natural Language Processing with Python: Analyzing Text with the Natural Language Toolkit.
- Kyle, K. (2020). Introduction to Corpus Analysis With Python 3
- OpenAI ChatGPT-4o, used to generate some exercises
- Stanford CS224N