
Python
The first week of this workshop will be spent learning the basics of the Python programming language. We will start from the assumption that the students have never used Python and move them through the basics of the language. The second week will focus on using these newly gained programming skills to automatically manipulate XML data. Using the lxml and Beautiful Soup Python libraries, we will take data from the Perseus repository and convert the TEI-XML in the repository to CTS-compliant XML and then feed the data back into the Perseus repository. In this second week, the students will design and implement their own XML manipulation pipeline that they will then be able to use later to automatically manipulate or convert large corpora of XML texts from one format to another.
Besides the basic skills in Python programming, the students will also learn to manipulate text using regular expressions, to expand the capabilities of Python by installing external libraries, and to use Python to make basic API calls, using the Perseus API as an example case. We expect you to have some familiarity XML and, preferably, some experience with a scripting or programming language. We also expect you to have either a Linux or Mac computer. Any Windows users will be expected to install a Linux virtual machine before the start of the workshop.
Week 1: Introduction to Python
Day 1: Python objects and workflows - Getting Started
Day 2: First steps in Text Analysis I
Day 3: First steps in Text Analysis II
Day 4: Text Analysis I
Day 5: Text Analysis II
Week 2: Manipulating XML with Python
Day 1: Getting texts from Perseus
Day 2: Parsing XML - the lxml tree
Day 3: Tree Manipulation I
Day 4: Tree Manipulation II
Day 5: Updating Perseus
2022
2021
2020
2019
- Home
- Schedule
- Workshops
- Lectures (public)
- Projects (public)
- Poster Session (public)
- Panel (public)
- Teasers (public)
- Cultural programme
- Experts
- Lecturers
- Scientific Committee
- Important dates (new)
- Application
- Scholarships (updated)
- Participation fees
- Refund policy
- T-Shirts
- Child care
- Birthday thoughts
2018
2017
2016
2015
- Home
- Schedule
- Workshops
- Overview
- XML-TEI encoding, structuring and rendering
- Methods and Tools for the Corpus Annotation of Historical and Contemporary Written Texts
- Comparing Corpora
- Spoken Language and Multimodal Corpora
- Python
- Basic Statistics and Visualization with R
- Sylometry
- Digital Editions & Editorial Theory: Historical Texts and Documents
- Spatial Analysis in the Humanities
- Building Thematic Research Collections with Drupal
- Project Planning and Management
- Lectures
- Projects
- Posters
- Panel
- Teaser / Special sessions
- Workshop Slams
- Experts
- Lecturers
- Scientific Committee
- Important dates
- Application
- Scholarships
- Fees
- Refund policy
- Child Care
- T-Shirt 2015
- Flyer and Poster
- Sponsorship
- Questions












