Teaching NLP outside Linguistics and Computer Science classrooms: Some challenges and some opportunities (2021)

Abstract: NLP’s sphere of influence went much beyond computer science research and the development of software applications in the past decade. We see people using NLP methods in a range of academic disciplines from Asian Studies to Clinical Oncology. We also notice the presence of NLP as a module in most of the data science curricula within and outside of regular university setups. These courses are taken by students from very diverse backgrounds. This paper takes a closer look at some issues related to teaching NLP to these diverse audiences based on my classroom experiences, and identifies some challenges the instructors face, particularly when there is no ecosystem of related courses for the students. In this process, it also identifies a few challenge areas for both NLP researchers and tool developers.

## introduction until a few years ago, it was common to see nlp courses predominantly taught in either computer science or linguistics departments, attended primarily by students from both the departments. in the past few years, there has been an increasing interest in nlp across disciplines. this is also reflected in the arrival of focused nlp courses such as "clinical nlp" foot_0 and "introduction to computational literary analysis" foot_1 . this trend is by no means specific to nlp alone. there has been a growing interest in including courses related to computing/programming in many liberal arts and sciences departments over the past few years. @xcite lists three reasons why many departments want such courses for their students: to support new discoveries through computational methods; to use new modes of interactive communication through apps, simulated environments etc.; to study the cultural, social and political influence of models and how to improve them. this need resulted in the creation of data science programs open for all students from various colleges/departments. naturally, the introduction of such programs started discussion around what should be included in such generic data science introductory curricula @xcite ). an introductory course in nlp is commonly offered either as an elective or as a part of the main coursework in most such data science course/minor/certificate programs in universities. such a course is also a common component in industry facing certification programs offered outside of university settings. however, popular textbooks and course materials on nlp are not created taking these diverse audiences and their motivations into consideration. they cover a range of topics in depth, requiring a deeper technical background that students coming from diverse academic backgrounds may not possess. while there are some recent efforts to write books focused to specific groups of students @xcite , they tend to focus on a smaller subset of topics within nlp. further, most courses and textbooks focus on the algorithms, with much less attention given to other essentials such as data collection, text extraction, pre-processing and other practical issues one will encounter when working on new research problems (and datasets), or while deploying nlp systems in some application scenario. considering that many students take these courses with goals unrelated to performing nlp research later (e.g., using nlp in their disciplinary research, working for a software company, etc.), this lack of appropriate materials can be seen as a potential gap between current nlp teaching and what is required. additionally, while research progress feeds into the development of course syllabi, we don't see the opposite i.e., teaching experiences informing nlp research. in this background, this paper summarizes my experiences with teaching multiple nlp courses to a diverse student body (stem, humanities, social sciences) both at undergrad and graduate level, and identifies some challenge areas for classroom instruction. at the same time, it also identifies some relatively understudied problems in nlp research and some issues to consider for tool developers. in short, the contributions of the paper can be summarized as follows: the rest of this paper is organized as follows: section 2 gives a brief overview of existing work on teaching nlp to put this paper's contributions in context. section 3 describes the nlp courses i taught with diverse goals and for diverse audiences, in detail. the next section then identifies some challenges in terms of teaching for all these different contexts (section 4). section 5 elaborates on how these teaching experiences help us identify some challenge areas for nlp researchers as well as tool developers. section 6 summarizes and concludes the paper. ## teaching nlp -a short review since the first teaching nlp workshop almost two decades ago, there has been some discussion in the community on various issues related to nlp pedagogy through the teachcl/teachingnlp workshop series, 3 and other events such as teach4dh. 4 . published work on teaching nlp can be broadly classified into four groups: however, to my knowledge, there hasn't been much discussion on the gap between what we learn in the classroom versus how you use it later (whether in research or practice), how we should adapt the syllabus depending on the audience for the course, and on how teaching experiences can potentially inform nlp research and practice. i addressed these issues in this paper, based on my experiences with teaching nlp. ## description of nlp courses this section describes the teaching scenarios in which i taught nlp between 2016-2021, which form the basis for the observations discussed in this paper. full semester courses described below were taught at an american university during 2016-18, and the online, compact courses were taught at two german universities during 2020-21. all classrooms were small in size (< 30 students) and there were no teaching assistants. inspired by @xcite 's classification of student's background and goals for using nltk foot_5 , and fosler-lussier (2008)'s grouping of students taking nlp courses, a grouping of my nlp teaching contexts, is shown in the rest of this section presents a detailed overview about the courses taught under these general focused undergrad a non-technical course intended to give an overview of language and computers, open for all disciplines an introductory course taught as a part of data science curriculum for liberal arts and sciences (las) majors grad/advanced undergrad two general nlp courses with a focus on various algorithms and applications two introductory nlp courses for specific graduate groups (applied linguists and economists) syllabus: the topics covered followed the book's structure, with more contemporary information. for example, the topic "tutoring systems" included a discussion of software such as duolingo, and the topic "dialog systems" included discussion on virtual assistants such as siri, cortana etc. the focus in using these tools in this classroom is to explain how such systems work, and evaluate their performance in real world contexts, rather than on teaching how to build such systems. two sessions were spent on giving a non-technical overview of nlp with some discussion on recent trends and on the broader impact of nlp on other areas of study. evaluation: the assignments in this course required students to explore a few existing nlp tools/demos (e.g., corenlp.run) or browse existing corpora (e.g., corpus.byu.edu). the students also did a group presentation that involved using a readily available day to day software which has some nlp component and summarizing its performance with concrete examples and qualitative measures. the final exam for this course had two parts: the first part required the students to write a report performing a error analysis of two commercial systems doing the same task (e.g., machine translation, speech recognition, etc.) and the second part asked them to write a perspective essay on the impact of language technologies on the society. ## challenges for teaching while all the courses received generally good student feedback towards the end, there are several issues that could have been managed better. some of these issues arise because i am teaching a diverse, non-conventional nlp audience, and hence, we don't have readily available solutions yet. each course, of course, comes with its own challenges. in this section, i will discuss some of the more general teaching challenges i faced across all courses, and how i addressed them. student goals and course contents: for many of the courses described in the previous section, the students did not have an ecosystem of related courses in their curriculum because there are no nlp focused research groups or teaching programs in the university. for all except g-gen courses, any nlp course is potentially a one off course that covers programming, nlp, and anything remotely concerned with computing for the students. the student goals accordingly are related to either just fulfilling a course requirement, or gaining some quick actionable insights that they can use right away, or show relevant skills when they apply for a job soon. in this background, i found it particularly challenging to adapt the syllabi such that they get readily usable practical skills, along with a solid foundation to explore the topics further on their own if needed. an approach that seemed to work is to tie each concept of the course to a practical use case (either a software application or some research problem in another discipline) and give assignments that are closer to their real-world scenarios. in the u-gen course, group activities involving apps the students regularly use such as duolingo, google search, siri etc generated a lot of interesting questions in the class. in the g-focused courses, providing an overview about relevant disciplinary research that uses nlp, and encouraging discussions about how the students can use nlp in their research turned out to be useful. the naclo exercises helped to introduce the challenges while working with textual data, in a way that holds students' attention and generated interesting discussions, in all the four cells in faculty goals and course contents: as mentioned above, many students lacked the eco-system of related courses (all except g-gen). thus, a lot of surrounding topics that are not typically a part of nlp courses had to be covered in these classes. specifically, these topics revolved around concepts of software programming, and the mathematics needed to understand some of the basic nlp methods. two questions i constantly grappled with in terms of my own teaching goals for u-focused and g-focused courses courses werehow much mathematics/programming/linguistics should be included? how can i encourage good programming/software engineering practices while still focusing on teaching the students to solve nlp related problems? for the first question, keeping mathematics and linguistics to the bare minimum, situating all programming related exercises in the context of nlp/textual data, and providing additional resources/tutorials for those interested in knowing more math/linguistics behind nlp helped . for the second question, i tried to write clean, wellcommented code for classroom examples as much as possible, and showed variations of writing the same piece of code, on top of the exercises in the prescribed textbook, discussing why we may chose one over the other. i also encouraged students to review each other's submissions and post discussions about programming in the forum for some of these courses. both these teaching strategies created some awareness about programming practices among the students. however, there were always students who wanted more/less of math/linguistics/programming during the classroom session itself, or in the form of assignments, especially in g-gen and g-focused courses. some students felt enough challenged, some were overwhelmed. this issue is by no means specific to my experiences, and has been documented in past work on teaching nlp too @xcite . i addressed this by providing optional, additional (ungraded) programming exercises and reading materials in all the courses. in terms of programming practices, i found it particularly challenging to introduce the idea of version control for code for students in u-focused and g-focused classrooms. the students without prior background in any form of programming found it difficult to understand git. i emphasized its importance and spent a small amount of time discussing why version control is useful, and how to do it, and provided a few tutorial references. while none of the students used version control during the courses, i hope that as they gain more experience, they will understand its relevance and adopt in practice. textbooks and the real world: if we ask ourselves -what will the students do with what they learn in these courses, provided they manage to stick to nlp?, we can think about three options: a) pursue further studies/research focused on nlp b) pursue further studies/research in their own discipline, using nlp methods in their work c) work in a company on nlp projects. among these, we can safely assume that the last two are the most likely scenarios for the audience i taught. in my experience as a software engineer and as a data scientist in industry, and while collaborating with researchers from other disciplines, some of the most common issues i encountered are: most of this issues are also commonly experienced by nlp researchers, if they work on a new problem or on creating a new corpus resource. yet, none of these issues are discussed even cursorily in available/standard nlp textbooks, which means that the students have to rely on a lot of online blogs and other resources. i addressed these issues by including topics such as: what does a nlp system development pipeline look like? and how is nlp used beyond cs research and software development scenarios? in the introductory "nlp overview" sessions itself in g-gen classrooms, introducing the students to the challenges one faces at each step. in the rest of the course too, i addressed these issues in more detail as needed, providing code examples, and including real-world case studies. particularly, one course described in this paper, "nlp without annotated dataset", entirely focused on the first issue mentioned earlier. in u-focused and g-focused classrooms, i added a detailed overview of how nlp is used in various disciplines as a research method, and organized student group discussions with contemporary research papers in these disciplines. even in the relatively simpler u-gen course scenario, we ran into the issue of the existing textbook being outdated, which required me to look for new materials on the topic. as mentioned earlier, i addressed this issue by introducing discussions and assignments on more contemporary developments about the textbook's topics. i found it particularly challenging to cover all of these aspects in one course, while also giving enough background in core nlp topics, though. in future, it would be useful to develop some structured reading material/tutorials/workbooks that can serve as goto sources on these topics, rather than asking the students to just explore on their own from a wide range of available material on the web. ## challenges beyond the teaching context generally, we see some discussion about how research informs teaching and the choice of topics in a course. we may notice the evolution of the standard natural language processing course over the past two decades, in terms of the topics covered 13 . we also see a lot of discussion around challenges encountered in teaching itself, as seen in the teaching nlp papers in the past. however, when teaching to outside audience, we can uncover hitherto under-studied research questions that are potentially more relevant while doing nlp outside of computer science and linguistics. i will focus on such issues in this section, by splitting it into two groups: nlp research and tool development. ## conclusion in this paper, i summarized my experiences with teaching nlp courses for diverse groups of undergraduate and graduate students and identified a few challenge areas for teaching such courses. i also discussed few challenge areas for nlp researchers and tool developers, addressing which can help improve both teaching nlp and the ease of applying nlp in research areas beyond linguistics and computer science. it should be acknowledged though, that this discussion is more qualitative than quantitative in nature. perhaps doing a survey of the students of such courses a couple of years later about how they are using nlp compared to what they learnt in a classroom could be one way to measure these observations in a more quantitative manner. i hope that this paper will contribute to the growing body of work on nlp teaching, and also lead to further discussion on an increased focus on the inter-disciplinarily relevant aspects of nlp teaching, research and practice.