Linguist 278: Programming for linguists — Syllabus

Brief description

Computer programming techniques for collecting and analyzing data in linguistic research. Introduction to regular expressions, and Python scripting. Hands-on experience gathering, formatting, and manipulating corpus, field, and experimental data, combining data from multiple sources, and working with existing tools. Knowledge of computer programming not required. Units: 1-4


Attendance (10%)

Attendance will be taken daily, with one point assigned for each class attended. Class will begin on time and end on time; I am obliged to finish on time, and you are obliged to arrive on time.

In-class participation in discussions (5%)

I would like everyone to ask questions, offer ideas, etc., in class. Questions and ideas on the Ed forum also count as participation.

Course-related questions can be asked on the Ed forum.

Weekly assignments (55%)

The assignments are distributed on Mondays and due one week later, before the start of class (10:30 am).

Assigments should be submitted on Canvas

The primary goal of these assignments is to give you practice problem-solving in Python, so that you become a fluent programmer.

Right from the start, you will be doing interesting things that you can connect with your work. To make this possible, the assignments typically involve code-fragments that you flesh out into (more or less) complete solutions. Part of doing the assignment is studying and thinking about the code provided, so that you can adapt it to other tasks later in the course, and to your own projects.

Penalties for late work: unless permission is given in advance, for each assignment A, 1 points off your total points earned for A for each calendar day it is late. An assigment becomes one day late at 1:30 pm on its due date. The absolute deadline for all work is the same as the exam due-date: December 9, 6:30 pm.

Final project (30%)

For your final project, you will write an advanced piece of reusable code. Part of the project will involve describing the use cases for this code. The project will be evaluated on the following critera:

  1. How ambitious is the project?
  2. How clearly articulated are the goals?
  3. How completely does the code achieve the stated goals?
  4. How well-documented is the code?
  5. How easy it is to use the code for new problems?
  6. How well structured is the code?

We will talk a lot more about the final project, and components of it will be part of the assignments during the second half of the term.

The final project is due at the end of our scheduled exam time (which we will not use): December 9, 6:30 pm.

Taking the class for fewer than 4 units

  1. If you do the class for 3 units, then you are required to do all the work, but your final project can be more limited in scope.
  2. If you do the class for 2 units, then you do not need to do the final project, and your grade will be on the remaining work, scaled pro-rata.
  3. If you do the class for 1 unit, then you need to do only 5 of the 8 assignments, and no final project.

You are always welcome to do more than the required work.

Relationship between numerical grades and final letter grades

This is the Python code that will be used to map numerical scores to final grades

def to_letter(n):
    n = float(n)
    let = ""
    if n >= 100:
        return "A+"
    elif n >= 94:
        return "A"
    elif n >= 90:
        let = "A"
    elif n >= 80:
        let = "B"
    elif n >= 70:
        let = "C"
    elif n >= 60:
        let = "D"
        return "F"
    deg = n % 10
    if deg >= 7:
        let += "+"
    elif deg >= 4:
        let += ""
        let += "-"
    return let

Academic honesty

Please familiarize yourself with Stanford's honor code. We will adhere to it and follow through on its penalty guidelines.

A special note about collaboration: you are permitted to work together on the assignments (though not the final project), but you have to turn in your own implementations, done from scratch (though possibly based on your discussions with others).

Students with documented disabilities

Students who may need an academic accommodation based on the impact of a disability must initiate the request with the Student Disability Resource Center (SDRC) located within the Office of Accessible Education (OAE). SDRC staff will evaluate the request with required documentation, recommend reasonable accommodations, and prepare an Accommodation Letter for faculty dated in the current quarter in which the request is being made. Students should contact the SDRC as soon as possible since timely notice is needed to coordinate accommodations. The OAE is located at 563 Salvatierra Walk (phone: 723-1066).