CS 124: From Languages to Information

Dan Jurafsky

The online world has a vast array of unstructured information in the form of language and social networks. Learn how to make sense of it and how to interact with humans via language, from answering questions to giving advice!

Schedule Piazza Forum Canvas Material

Schedule

Week Date Homework Quiz In-class Video Lectures and Readings (to be done by the Friday of the week unless I specify an earlier date)
1 Mar 30, Apr 1 - -
  • Tue: Live Lecture: Intro

  • Thurs: Group Work 1: Text Processing with Unix tools (watch the 4 "Basic Text Processing" videos before class)
Edit Distance Videos [slides pptx] [slides pdf]
2 Apr 6 and 8

PA 1: Spamlord

Due Fri Apr 9, 5:00pm

Quiz 1: Text Processing/Edit Distance

Due Tue Apr 6, 11:59pm

    Tuesday: Live tutorial: How to use Jupyter notebooks with Python
    Thursday: No Class, optional PA Work Sessions
Language Modeling Videos [slides pptx] [slides pdf]
Naive Bayes and Text Classification Videos [slides pptx] [slides pdf]
3 Apr 13 and 15

PA 2: Triage and Sentiment (NB+LR)!

Due Fri Apr 16, 5:00pm

Quiz 2: Language Modeling/Naive Bayes/Regression

Due Tuesday Apr 13, 11:59pm

    Tuesday: Group Work 2: Naive Bayes and Sentiment Analysis
    Group work
    [solutions] (watch videos beforehand)

    Thursday: No Class, optional PA Work Sessions



4 Apr 20 and 22

PA 3: Information Retrieval

Due Fri Apr 23, 5:00pm

Quiz 3: Information Retrieval

Due Tuesday Apr 20, 11:59pm

Chris Manning Video: Information Retrieval (I) [slides pptx] [slides pdf]
  • MR+S Chapter 1: Boolean Retrieval (pages 1-17)
  • MR+S Chapter 2: Term vocabulary and postings lists (only pages 33-42)
Chris Manning Video: Information Retrieval (II) [slides pptx] [slides pdf]
  • MR+S Chapter 6: Scoring, term weighting, and the vector space model, (only pages 100 and 107-116)
  • MR+S Chapter 8: Evaluation in Information Retrieval (only pages 139-149)
5 Apr 27 and 29

PA 4: Quizlet!

Due Fri Apr 30, 5:00pm

Quiz 4: Vector Semantics and Sequence Labelling

Due Tue Apr 27, 11:59pm

Tuesday: No Class, optional PA Work Sessions

Thursday: Live Lecture Neural Networks


  • Vector Semantics and Neural Embeddings
  • Parts of Speech and Named Entities
6 May 4 and 6

Homework 5: Neural Networks

Due Fri May 7, 5:00pm

Quiz 5: Neural Networks

Due Tue May 4, 11:59pm

Tuesday: No Class / PA Work Sessions

Thursday: First Midterm

  • Chat Bots

Optional advanced reading:
7 May 11 and 13 -

Quiz 6: Chatbots/Question Answering

Due Tue May 11, 11:59pm

Tuesday: Live Lecture Recommender Systems

Thursday: No Class, optional PA Work Sessions

Recommender systems (Collaborative Filtering) (no video)
8 May 18 and 20

Homework 6: Chat!

Due Fri May 21, 5:00pm

Quiz 7: Recommendation Systems

Due Tue May 18, 11:59pm

Tuesday Group Work 4: Smartphone Chatbots
Group Work

Thursday: No Class, optional PA Work Sessions

Web graphs, Links, and PageRank Videos [slides pptx] [slides pdf]
  • MR+S Chapter 21: Link Analysis
9 May 25 and 27 -

Quiz 8: Pagerank

Due Tue May 25, 11:59pm

Tuesday: Live Lecture Social Networks


Thursday: No Class, optional PA Work Sessions
Social Networks (no videos)
10 Jun 1 and 3 -

Quiz 9: Networks and Zipfs Law

Due Tues Jun 1, 11:59pm

Tuesday: Live Lecture: NLP for Social Good


Thursday: Second Midterm
NLP for Social Good (No videos)

Logistics

Instructor
Dan Jurafsky (jurafsky@stanford.edu)
Office: Margaret Jacks 117 (when not during COVID)
Office Hours: TBD
Teaching Assistants
    TBD

TA Office Hours
  • Tuesdays 1:00pm to 2:30pm
  • Wednesdays 7:00pm to 10:00pm
  • Fridays 1:00-2:30pm
Class Time

Tuesday and Thursday 2:30-3:50pm

Email

We can not reply to email sent to individual staff members. If you have a question that is not confidential or personal, post it on the Piazza forum - responses tend to be quicker and have a wider audience. To contact the teaching staff directly, we strongly encourage you to come to office hours. If that is not possible, you can also email (non-technical questions only) to the course staff list, cs124-spr2021-staff@lists.stanford.edu. If you have a matter to be discussed privately, please come to office hours, or use cs124-spr2021-staff@lists.stanford.edu to make an appointment. For grading questions, please talk to us after class or during office hours.

We try to redundantly use Piazza, Canvas, and mailing lists to make sure any messages we convey to the class reach you all! We will assume that all students read these messages.

Honor Code

Since we occasionally reuse homeworks from previous years, we expect students not to copy, refer to, or look at the solutions in preparing their answers. It is an honor code violation to intentionally refer to a previous year's solutions. This applies both to the official solutions and to solutions that you or someone else may have written up in a previous year. It is also an honor code violation to find some way to look at the test set or interfere in any way with programming assignment scoring or tampering with the submit script.

Since quizzes are a form of assessment, students are not allowed to collaborate on completing quizzes. It is an honor code violation to discuss quiz questions with other students.

Textbooks
  • There is no required textbook, but I will expect you to know the material listed above, drawn from the textbooks and other readings. The material in the readings will be tested on the final exam. Different people may learn better from different combinations of videos/lectures, reading the chapters, or coming to the in-class group exercises. The best-prepared students who do the best on the final exams tend to do all three. But I won't take roll for lectures and attendance is up to you.

Course Description

Extracting meaning, information, and structure from human language text, speech, web pages, social networks. Introducing methods (string algorithms, edit distance, language modeling, machine learning classifiers, neural embeddings, inverted indices, collaborative filtering, PageRank), applications (chatbots, sentiment analysis, information retrieval, question answering, text classification, social networks, recommender systems), and ethical issues in both.

Prerequisites

CS106B. CS 107 can be helpful, but if you haven't had it we'll cover the required UNIX material.

Required Work

From Languages to Information is a (semi-)flipped class with much of the material online. Most of the lectures have been prerecorded, and you can watch them at home; a few of the lectures will be given live during class and recorded so you can watch afterwards for review. The weekly quizzes and programming homeworks will be automatically uploaded and graded. Lecture, quizzes, and homeworks are available on Canvas.
Video Lectures

Each week, we will ask you to watch a set of video lectures (2 to 2.5 hours total). The videos will have some in-video questions embedded in them, which you should answer. You are required to watch the videos but the embedded quizzes are not counted toward the final grade. For those duplicate lectures you can watch either the in-class or recorded version.

In class Lectures

A few lectures will be live, but will be recorded and posted to Canvas afterwards for those who missed it, or for review for the midterms.

In-class group problem-solving

4 in-class sessions are for group problem-solving activities. These are strongly recommended, and the first one (April 1 on Unix text processing) is required and will be tested on the quiz, meaning that if you can't make that date, you must get permission in advance to do the entire exercise at home instead (for those taking the class fully asyncrhonously). Previous students who did well in the class have reported that the in-class group exercises have been extremely useful.

Automated Review Quizzes

After watching a week's video lectures, we will ask you to answer an open-notes, open-book review quiz (about 5 questions) on the content that you just learned. Each review quiz may be attempted twice, with a time lag between each attempt. The questions, as well as the options for each question, are randomly selected from a larger pool each time you take a quiz. The system will automatically take the best score of your two attempts for the quiz. Review Quizzes for each week are due 11:59pm Tuesday of the following week. There are no late days for review quizzes.

Class Participation

You have to watch all lectures, but video-only is fine, attendence for the live lectures is optional. However, attendence for group work sessions is strongly recommended (but still optional); we will cover material that will be tested on the midterm.
You can get extra credit for class participation by:: helpful answers on the class forum, helping out other students in office hours or group work sessions, being the first person to find typos in the textbook (not counting bugs in figure or chapter numbering), speaking up in the group work sessions.

Programming Assignments

6 Python programming assignments. Each assignment is due at 5:00pm on the Friday it is due.

Programming Assignment Collaboration for PA 1-5: You may talk to anybody you want about the assignments and bounce ideas off each other. But you must write the actual programs yourself. We will use the normal automatic checks for overlap between your code and other students' code.

Programming Assignment Collaboration for PA 6: PA6 is a group homework, so you can work together with your group, and write code together. You must describe in your writeup who worked on which parts of the assignment/code.

Late homeworks

You have 4 free late (calendar) days to use on programming assignments 1-5. You cannot use late days on PA 6. Once late days are exhausted, any PA turned in late will be penalized 20% per late day. Each 24 hours or part thereof that a homework is late uses up one full late day. However, no assignment will be accepted more than four days after its due date.

Readings

This class has a significant amount of textbook reading. Most weeks have around 25 textbook pages. The homeworks and exams will be based heavily on the readings.

Final grade computation
  • 63% homeworks (PAs 1-5 are each worth the same, 9% (ignore the different point values for each homework). PA6 is worth 18%, double the others)
  • 11% Midterm 1
  • 11% Midterm 2
  • 15% weekly review quizzes