Introduction to Computational Text Analysis

Date:

Workshop at American Political Science Association Section on Migration and Citizenship Pre-Conference, Vancouver, BC, CA

Instructor: Tom Einhorn

Workshop materials developed in collaboration with UBC prAxIs team.

An introductory workshop to computational text analysis for social scientists with no prior experience in the field. The session started with the basics, building up to zero-shot classification with large language models (LLMs) using natural language inference (NLI). The workshop demonstrated how LLNs can classify real historical documents using simple, natural language prompts and without requiring task-specific training data. Topics included the strengths and limitations of prompt-based classification, how it compares to and complements traditional human coding, and practical considerations for integrating computational methods into qualitative and mixed-methods research.

Read about the workshop and download workshop materials on the UBC Centre for Migration Studies website.

From the conference program:

Have you previously done qualitative analysis of texts and are curious about how AI can assist with content analysis? Does your research rely on human coding and you wonder about the potential of computational approaches? This session will introduce you to computational text analysis. We will explore prompt-based classification of real historical documents, demonstrating how AI models can analyze text without being specifically trained on your particular research question using simple, natural language prompts. We will discuss what makes this method powerful for social science research, its limitations, and how it complements traditional content analysis methods. This session is designed for beginners. No programming experience required. (Note: This session focuses on natural language inference rather than generative AI tools like ChatGPT or encoder-only models like BERT.)

Workshop Details

Duration: 2 hours.

Participants: Members of the Section on Migration and Citizenship Pre-Conference at the American Political Science Association, in Vancouver for the APSA annual meeting.

Software/tools: Python, JupyterLab notebook.