Studiegids

nl en

Python for Linguists

Vak
2023-2024

Admission requirements

None.

Description

Scientists have always been building their own research tools. For linguists this is no different, and many of our tools take the form of software, such as programs that let us collect linguistic data, analyze it, run experiments, or simulate aspects of language processing. Python is arguably the most accessible and most popular programming language for developing research tools (and many other things), for linguistics and beyond.

While developed for linguists, the course focuses on elementary programming skills, within the standard Python toolbox, and covers more advanced code libraries used by linguists only in passing. Elementary skills are built with the help of an online syllabus with weekly homework exercises and small projects, focused on incremental discovery of the Python language. Besides practical skills, the exercises teach conceptual understanding (why Python works that way) and useful coding habits and way of thinking.

Classroom coding adventures will cover some useful external code libraries in passing (such as Spacy, Pandas, Scikit-Learn and Seaborn), as well as acquaint students with a selection of more advanced topics from the primary computational linguistics literature, such as distributional semantics, dependency parsing, sentiment analysis, and probabilistic language generation.

Course objectives

  • You will be able to code and execute Python programs that read, analyze and/or write mainly textual and tabular data, involving such steps as tokenization, cleaning, parsing, counting, searching, and sorting.

  • You will be able to explain, in outline, how a computer interprets Python code, including control flow (loops, break, continue, if-else), function calls, stack trace and variable scope.

  • You will be able to decompose a larger task into sub-tasks, and solve those by choosing appropriate built-in functions (e.g., range, enumerate, zip) and datastructures (e.g., list, dictionary, tuple, set) as well as defining your own reusable functions.

  • You will gain initial familiarity with some external Python libraries, such as Spacy, Pandas, Scikit-Learn and Seaborn, and develop the ability to, in the future, master these libraries on your own with the help of online documentation and tutorials.

  • You will be able to list, and explain at a conceptual level, a selection of topics and approaches from the field of computational linguistics, such as distributional semantics, dependency parsing, sentiment analysis, probabilistic language generation and transformers.

Timetable

The timetables are available through My Timetable.

Mode of instruction

Seminar

Assessment method

Assessment

There will be one written exam at the end, with a mix of closed questions, short open questions and short programming exercises. Throughout the course, portions of the homework will be marked as mandatory, to be submitted for a simple pass/fail grade. Only students with at least 80% of these assignments passed can pass the course.

Weighing

Your final grade is based on the exam, with a maximum grade of 5.0 (fail) if insufficient homework assignments are passed.

Resit

A resit will be offered at the end of the course. A resit for the mandatory portion of the homework will be offered in the form of a substantial programming assignment at the end of the course.

Inspection and feedback

How and when an exam review will take place will be disclosed together with the publication of the exam results at the latest. If a student requests a review within 30 days after publication of the exam results, an exam review will have to be organized.

Reading list

A free online syllabus with exercises and notes will be provided by the instructor.

Registration

Enrolment through My Studymap is mandatory

General information about course and exam enrolment is available on the website.

Contact

For substantive questions, contact the lecturer listed in the right information bar

For questions related to the content of the course, please contact the lecturer, you can find their contact information by clicking on their name in the sidebar.

For questions regarding enrollment please contact the Education Administration Office Reuvensplaats E-mail address Education Administration Office Reuvensplaats: osz-oa-reuvensplaats@hum.leidenuniv.nl

For questions regarding your studyprogress contact the Coordinator of Studies

Remarks

not applicable