Skip to content

Coursework for deeplearning.ai NLP Specialization. 2024 Version (with Tensorflow)

License

Notifications You must be signed in to change notification settings

chiffonng/NLP-Specialization

Repository files navigation

Natural Language Processing Specialization

Archive of my weekly final assignments with deeplearning.ai's Natural Language Processing Specialization on Coursera, taught by Younes Bensouda Mourri, Instructor of AI at Stanford University and Łukasz Kaiser, Staff Research Scientist at Google Brain and the co-author of Tensorflow, the Tensor2Tensor and Trax libraries, and the Transformer paper.

Certificate

License notes

The assignments and materials are the intellectual property of deeplearning.ai, which should only be shared for educational purposes. Please do not use these for any commercial purposes. I do not own the rights to the course material, nor am affiliated with deeplearning.ai in any way. The license added CC-BY-NC-SA 4.0 is inferred from the course policy and copyright notice.

Changes to the original assignments

Abiding by LICENSE CC-BY-NC-SA 4.0, I hereby declare changes made to the original distribution:

  • I added my solutions to the assignments.
  • In-line comments for some assignments were modified to reflect the intention of the code (for my learning purposes)

Other notes

This is not complete workspace. I have only included the final assignments for each week.

  • The course also includes quizzes and practice assignments.
  • Data and pre-trained models are not included in this repository, since they're large and I'm not sure about their redistribution policy.

My work is stored here for my own review. While I hope that this repository can be a helpful resource for others, I would like to remind you that copying or using any of the code here will not help you learn the material. I encourage you to try to solve the assignments yourself before looking at the solutions.

Structure

Course 1: Classification and Vector Spaces in NLP

Week 1: Logistic Regression for Sentiment Analysis of Tweets

  • Use a simple method to classify positive or negative sentiment in tweets

Week 2: Naïve Bayes for Sentiment Analysis of Tweets

  • Use a more advanced model for sentiment analysis

Week 3: Vector Space Models

  • Use vector space models to discover relationships between words and use principal component analysis (PCA) to reduce the dimensionality of the vector space and visualize those relationships

Week 4: Word Embeddings and Locality Sensitive Hashing for Machine Translation

  • Write a simple English-to-French translation algorithm using pre-computed word embeddings and locality sensitive hashing to relate words via approximate k-nearest neighbors search

Course 2: Probabilistic Models in NLP

This is the second course of the Natural Language Processing Specialization.

Week 1: Auto-correct using Minimum Edit Distance

  • Create a simple auto-correct algorithm using minimum edit distance and dynamic programming

Week 2: Part-of-Speech (POS) Tagging

  • Apply the Viterbi algorithm for POS tagging, which is important for computational linguistics

Week 3: N-gram Language Models

  • Write a better auto-complete algorithm using an N-gram model (similar models are used for translation, determining the author of a text, and speech recognition)

Week 4: Word2Vec and Stochastic Gradient Descent

Course 3: Sequence Models in NLP

This is the third course in the Natural Language Processing Specialization.

Week 1: Sentiment with Neural Nets

  • Train a neural network with GLoVe word embeddings to perform sentiment analysis of tweets

Week 2: Language Generation Models

  • Generate synthetic Shakespeare text using a Gated Recurrent Unit (GRU) language model

Week 3: Named Entity Recognition (NER)

  • Train a recurrent neural network to perform NER using LSTMs with linear layers

Week 4: Siamese Networks

  • Use so-called ‘Siamese’ LSTM models to compare questions in a corpus and identify those that are worded differently but have the same meaning

Course 4: Attention Models in NLP

Week 1: Neural Machine Translation with Attention

  • Translate complete English sentences into French using an encoder/decoder attention model

Week 2: Summarization with Transformer Models

  • Build a transformer model to summarize text

Week 3: Question-Answering with Transformer Models

  • Use T5 and BERT models to perform question answering

Week 4: Chatbots with a Reformer Model

  • Build a chatbot using a reformer model