Syllabus

  1. 01Preparing TextBefore any model can count words, text has to be split into clean, consistent tokens. Write a tokenizer with regular expressions and filter out stop words.2 lessons
    1. 01Tokenizing Text
    2. 02Stop Words
  2. 02Bag-of-WordsRepresent documents by their word counts: build the model by hand, scale it up with scikit-learn's CountVectorizer, train a Naive Bayes classifier, and see what word order costs you.5 lessons
    1. 01Counting Words
    2. 02Vocabularies and Count Vectors
    3. 03CountVectorizer in scikit-learn
    4. 04Classifying Text with Naive Bayes
    5. 05What Bag-of-Words Misses
  3. 03TF-IDFWeight words by how characteristic they are of a document: compute term frequency and inverse document frequency by hand, match scikit-learn's formula, and pull out each document's key terms.3 lessons
    1. 01Term Frequency and Inverse Document Frequency
    2. 02TfidfVectorizer and Smoothing
    3. 03Finding Key Terms in Documents
  4. 04Word EmbeddingsRepresent meaning with dense vectors: measure distance and similarity with NumPy, explore word vectors, learn embeddings from co-occurrence counts, and see how word2vec trains on context.4 lessons
    1. 01Measuring Distance Between Vectors
    2. 02Word Vectors and Similarity
    3. 03Learning Embeddings from Co-occurrence
    4. 04word2vec, Pretrained Vectors and Beyond
  5. 05Project: Route Support TicketsPut it all together: load labeled tickets from a CSV file, hold out test data, train a TF-IDF and Naive Bayes classifier, measure its accuracy and route new tickets.1 lesson
    1. 01Project: A Support Ticket Router