Applied Language Technology: NLP for the Humanities (2021)

Abstract: This contribution describes a two-course module that seeks to provide humanities majors with a basic understanding of language technology and its applications using Python. The learning materials consist of interactive Jupyter Notebooks and accompanying YouTube videos, which are openly available with a Creative Commons licence.

## introduction language technology is increasingly applied in the humanities @xcite . this contribution describes a two-course module named applied language technology, which seeks to provide humanities majors with a basic understanding of language technology and practical skills needed to apply language technology using python. the module is intended to empower the students by showing that language technology is both accessible and applicable to research in the humanities. ## pedagogical approach the learning materials seek to address two major pedagogical challenges. the first challenge concerns terminology: in my experience, the greatest hurdle in teaching language technology to humanities majors is not 'technophobia' @xcite , but the technical jargon that acts as a gatekeeper to knowledge in the field (cf. @xcite . this issue is fundamental to teaching students with no previous experience of programming. to exemplify, beginners in my class occasionally interpret the term 'code' in phrases such as "write your code here" as a numerical code needed to unlock an exercise, as opposed to a command written in a programming language. for this reason, the learning materials introduce concepts in python and language technology in layperson terms and gradually build up the vocabulary needed to advance beyond the learning materials. the second challenge involves the diversity of the humanities, which covers a broad range of disciplines with different epistemological and methodological standpoints. this results in considerable differences in previous knowledge among the students: linguistics majors may be more likely to be exposed to computational methods and tools than their counterparts majoring in philosophy or art history. some students may have taken an introductory course in java or python, whereas others have never used a command line interface before. to address this issue, the learning materials are based on jupyter notebooks, which provide an environment familiar to most students -a web browserfor interactive programming. the command line is used for interacting with github, which is used to distribute the learning materials and exercises. the module also emphasises peer and collaborative learning: 20% of the course grade is awarded for activity on the course discussion forum hosted on github. all activity -both asking and answering questions -counts positively towards the final grade. this allows the students with previous knowledge to help onboard newcomers. according to student feedback, this also fosters a sense of community. the discussion forum is also used to discuss weekly readings, which focus on ethics (e.g. @xcite and the relationship between language technology and humanities (e.g. @xcite . these discussions are guided by questions that encourage the students to draw on their disciplinary backgrounds, which exposes them to a wide range of perspectives to language technology and the humanities. ## learning materials the learning materials cover two seven-week courses. the first course starts by introducing rich, plain and structured text and character encodings, fol-lowed by file input/output in python, common data structures for manipulating textual data and regular expressions. the course then exemplifies basic nlp tasks, such as tokenisation, part-of-speech tagging, syntactic parsing and sentence segmentation by using the spacy 3.0 natural language processing library @xcite to process examples in the english language. this is followed by an introduction to basic metrics for evaluating the performance of language models. the course concludes with a brief tour of the pandas library for storing and manipulating data @xcite . the second course begins with an introduction to processing diverse languages using the stanza library @xcite , shows how stanza can interfaced with spacy, and how the resulting annotations can be searched for linguistic patterns using spacy. the course then introduces word embeddings to provide the students with a general understanding of this technique and its role in modern nlp, which is also increasingly applied in research on the humanities. the course finishes with an exploration of discourse-level annotations in the georgetown university multilayer corpus @xcite , which showcases the conll-u annotation schema. to what extent the students meet the learning objectives is measured in weekly exercises. the weekly assignments are distributed through github classroom and automatically graded using nbgrader foot_0 , which allows generating feedback files with comments that are then pushed back to the student repositories on github. the exercises are also revisited in weekly walkthrough sessions to allow the students to ask questions about the assignments. the students are also required to complete a final assignment for both courses: the first course concludes with a group project that involves preparing a set of data for further analysis, whereas the second course finishes with a longer individual assignment. all learning materials are openly available with a creative commons 4.0 cc-by licence at the addresses provided in the following section. access to the weekly exercises is available on request. ## technical stack the learning materials are based on jupyter notebooks @xcite hosted in their own github repository. 2 this repository constitutes a submodule of a separate repository for the website, which is hosted on readthedocs. 3 the notebooks containing the learning materials are rendered into html using the myst-nb parser from the executable books project. 4 this allows keeping the learning materials synchronised, and enables the users to clone the notebooks without the source code for the website. myst-nb also adds links to @xcite to each notebook on the readthedocs website, which enables anyone to execute and explore the code. the jupyter notebooks provide a familiar environment for interactively exploring python and the various libraries used, whereas the readthedocs website is meant to be used as a reference work. both media embed videos from a youtube channel associated with the courses. 5 these short explanatory videos exploit the features of the underlying audiovisual medium, such as overlaid arrows, animations and other modes of presentation to explain the topics. ## conclusion this contribution has introduced a two-course module that aims to teach humanities majors to apply language technology using python. targeted at a student population with diverse disciplinary backgrounds and levels of previous experience, the learning materials use multiple media and layperson terms to build up the vocabulary needed to engage with python and language technology, complemented by the use of a familiar environment -a web browser -for interactive programming using jupyter notebooks.