Skip to Main Content

Event box

Python for not quite Absolute Beginners : text analysis with spaCy and prompts, #summer(school) In-Person


This course is part of our Python Summer School. We will offer courses throughout the week from August 10–14.
You can sign up for one course or as many as you like.

Python for Absolute Beginners Part 1 & 2 are our core courses. After completing these (or if you already have Python knowledge equivalent to the course material), you can join all other Python courses in our Summer School.

You can find all of our course materials here: https://kubdatalab.github.io/python

And sign up for more courses here: https://kubkalender.kb.dk/calendar/datalab

---

In the Python for not quite Absolute Beginners courses, we expand on previous learning to write more structured and reliable programs. Before you attend these courses, make sure you have completed Python for Absolute Beginners Part 1 and 2 or are familiar with its topics.

In this workshop, we shift focus from how to handle text data in pandas to doing text analysis and interpretation. We approach text analysis from two different perspectives. 

Part A – spaCy 

You will gain knowledge about: 

  • the Python library spaCy and what you can do with that (tokens, lemmas, part-of-speech tags, dependencies) 
  • how to process an entire text through a language model 
  • how to identify and count linguistic patterns (for example, adjectives describing characters, places, and buildings) 

Part B – Prompts in Text Analysis 

You will gain knowledge about: 

  • how you can use prompt engineering as a method in text analysis 
  • how to connect securely to the Mistral API (using environment variables for API keys rather than storing them in notebooks) 
  • the difference between user and system messages, as well as settings such as temperature and max tokens 
  • how to give the model specific analytical tasks (summaries, structured analysis, passage selection, sentiment analysis) 
  • how to save and critically evaluate the model’s responses (is the output grounded in the text and analytically useful?) 

By the end of the workshop, you will have been presented for methods to work with text analysis with pandas, with spaCy, and with LLM-based prompting, and you will have an idea about methods to apply in your future research. 

 

Practical information: We will be working in Jupyter Lab / Jupyter Notebook, which requires some installation, but you can also work in either Google Colabs or ERDA which require only a Google or KU account, respectively. For more information and help, consult "Install & Run Python" on the course page:
https://kubdatalab.github.io/python/docs/howto/setup.html

 

Related LibGuide: Datalab by Christian Knudsen

Date:
14/08/2026
Time:
9:01 - 12:00
Time Zone:
Central European Time (change)
Location:
Library Lighthouse, zone 1, Library Lighthouse, zone 2
Campus:
Nørre Campus
Audience:
  Level 2 - Basic / Let øvet  
Categories:
  Analysis     English     Python     Summer School     Datalab  

Registration is required. There are 13 seats available.

Undervisere / teachers

Profile photo of Benjamin Derksen
Benjamin Derksen
Profile photo of Lars Kjær
Lars Kjær
Profile photo of Daniel Pryn
Daniel Pryn