
Explore how natural language processing bridges computers and human language using Python and NLTK. Build real world projects that categorize text, analyze sentiment, and model topics.
By the end of this section, not the course, the course is updated!
Install the required packages and software using Anaconda and terminal commands, create a new project, and set up semantic modeling tools like gensim with butter for proper functioning.
Learn tokenization by breaking text into tokens and smaller pieces such as words or sentences for analysis. Define methods to divide text into many tokens.
Learn practical tokenization in Python NLP by creating tokenizers, splitting text into sentence and word tokens, and analyzing how punctuation shapes tokenization.
Explore stemming to convert words to their base forms, handle variations of the same word, and enable text analysis and statistics by reducing forms to a common base.
Explore stemming in NLP with Python by comparing Porter, Lancaster, and Snowball stemmers, transforming words to base forms, printing results in a table, and evaluating strictness and speed.
Explore lemmatization in natural language processing with Python by converting words to base forms, iterating over vocabularies, and formatting outputs for comparison.
Learn to divide text into meaningful chunks for NLP, using a corpus to create chunks of N words for information extraction, and understand how chunking differs from tokenization.
Define a Python function to divide input text into chunks, parameterized by words per chunk, read the Brown corpus, and display the resulting chunks.
Build a bag of words by extracting term frequencies from text chunks. Read input data, split into chunks, and produce a document-term matrix with count vectorizer, revealing the vocabulary.
Build a category predictor for text classification using tf-idf features with idf weighting, trained on a corpus to infer categories like sports, politics, or science.
Train a category predictor for a five-class text classification task using a count vectorizer and tf-idf transformer on a fetched scikit-learn dataset, then train a multinomial classifier and evaluate outputs.
Identify gender in NLP by analyzing the last letters of names to predict male or female. Explore how many letters to consider to find the best parameter.
Define a function to extract the last two letters of each name, lowercase them, and use these features to identify gender, with an 80/20 training–testing split and accuracy reporting.
Explore sentiment analysis within natural language processing on a movie reviews dataset, training a model to classify reviews as positive or negative using base classifiers and top informative words.
This lecture guides building a Python sentiment analyzer for movie reviews, using feature extraction and a dictionary of features, a top 15 informative features selection, and an 80/20 train-test split.
Master natural language processing with Python, covering tokenization, lemmatization, and a bag of words with a document-term matrix for text classification, sentiment analysis, gender identification, and topic modeling.
Explore fundamental and advanced feature engineering methods for text data. Learn how turning unstructured text into numerical features powers NLP models, with notes on advantages, disadvantages, and examples.
Explore the count vectorizer to convert text into features by counting word occurrences, addressing frequency limitations of binary bag-of-words representations.
This lecture explains n-grams as a solution to losing context when analyzing text, showing unigram, bigram, and trigram features and using a count vectorizer to generate them with Python libraries.
Learn hash vectorizing in natural language processing with Python, using the hashing trick to encode text as memory efficient numerical indices. Produce fixed-size vectors for supervised or unsupervised tasks.
Word embedding maps words to vectors that capture context and semantic relations. CBOW and skip-gram models trained on corpora learn word similarities and analogies, such as king to queen.
Download external, labeled movie review corpus using the categorized plaintext corpus reader, then access positive and negative categories and print sample documents for sentiment analysis.
Explore frequency distribution on informal web text corpora, counting distinct words and revealing the ten most common tokens, while learning how preprocessing improves results in NLP with Python.
Explore how WordNet stores word senses in a hierarchical database and how to retrieve definitions, synonyms, and example sentences for words like chair and bat, using NLTK's WordNet.
Explore WordNet basics by extracting hyponyms and hypernyms in Python, tracing word senses from root to leaf nodes, and identifying direct parent terms like adult and female for woman.
Learn how to compute the average policy for nouns using WordNet senses and part of speech filters, with hands-on Python code to gather distinct lemmas.
Explore tokenization by segmenting text into tokens and building a lexicon for NLP. Convert these tokens into bag-of-words vectors to power machine learning, document retrieval, and search.
Explore tokenizing sentences with whitespace using the split method, address punctuation in tokens, and convert words to numerical vector representations for NLP tasks.
Build a vocabulary of unique tokens, encode documents with one-hot vectors, and explore vocabulary size using Banda's data frames with a default integer row index.
Convert sentences into one-hot and bag-of-words vectors to preserve meaning for neural language models and NLP pipelines, enabling efficient, scalable processing of large vocabularies.
Convert text into a binary vector that marks word presence in a sentence. Use a dictionary-based sparse representation for vocabulary to store only present words.
Understand the dot product, aka inner or scalar product, which yields a single value from elementwise vector multiplication and summation, and its link to matrix product and inner joins.
Use bag-of-words and dot product to measure sentence similarity, explore vector space models, and examine binary vector representations for efficient document retrieval and text search.
Explore tokenization that splits on whitespace and punctuation, decide whether punctuation becomes tokens or is ignored, and use regex to group words, reducing vocabulary dimensionality in NLP.
Analyze the role of stop words in NLP, balancing vocabulary size, computational efficiency, and information content, and learn when to apply domain-specific filters without losing crucial two-grams.
Normalize capitalization to reduce vocabulary size and memory usage, consolidate similar spellings, and strengthen cross-token meaning, while balancing potential loss of information and preserving proper nouns for named entity recognition.
Compare stemming and lemmatization by tradeoffs in recall and precision, noting that stemmers are faster but increase ambiguity, while lemmatization preserves meaning for more accurate search results.
Explore how sentiment analysis measures positivity in text using NLP pipelines and outputs a score between minus one and plus one. Compare rule-based and machine learning approaches.
Explore two sentiment analysis approaches: a rule-based heuristics method using a keyword dictionary and token processing, and a data-driven machine learning approach trained on labeled text to predict sentiment scores.
Learn sentiment analysis in Python by building and evaluating a name-based baseline model, incorporating tokens, negation handling with Vader, and improving accuracy through data-frame driven experiments.
Explore turning word counts into continuous representations for NLP, using bag-of-words, frequency-based methods, and tf-idf with n-grams to improve keyword search, spam filters, and sentiment analysis.
Examine the bag-of-words approach by counting word occurrences, normalizing term frequency, and filtering stop words through tokenization to compare documents in natural language processing with Python.
Turn text into vectors by counting tokens, building a shared lexicon across documents, normalizing counts, and creating fixed-length document vectors for analysis.
Explore the vector space representation of documents and the corpus vocabulary, then use cosine similarity and dot products to compare document vectors.
Learn how term frequency and inverse document frequency combine to form tf-idf, weighting words by their importance across a corpus to enable topic modeling and document comparison.
Replace word counts with tf-idf to create meaningful document vectors, use cosine similarity for retrieval, and convert the tf-idf index into a chat system by pairing questions with responses.
Explore how tf-idf weights words by inverse document frequency to build vector space representations of word meanings, enabling cosine distance as a primary measure of semantic similarity.
Explore how keyword search compares with semantic search by building topic vectors from tf-idf scores and latent semantic analysis to represent meaning and improve document retrieval.
Address tf-idf limitations for semantic search by introducing topic vectors for words and documents, handling synonyms and polysemy, and reducing dimensions for meaningful semantics.
Transform tf-idf word frequencies into topic vectors by weighting words for three topics, using a 3xN weight matrix and matrix multiplication to obtain document topic representations.
-- UPDATED -- (NEW LESSONS ARE NOT IN THE PROMO VIDEO)
THIS COURSE IS FOR BEGINERS OR INTERMEDIATES, IT IS NOT FOR EXPERTS
This course is a part of a series of courses specialized in artificial intelligence :
Understand and Practice AI - (NLP)
This course is focusing on the NLP:
Learn key NLP concepts and intuition training to get you quickly up to speed with all things NLP.
I will give you the information in an optimal way, I will explain in the first video for example what is the concept, and why is it important, what is the problem that led to thinking about this concept and how can I use it (Understand the concept). In the next video, you will go to practice in a real-world project or in a simple problem using python (Practice).
The first thing you will see in the video is the input and the output of the practical section so you can understand everything and you can get a clear picture!
You will have all the resources at the end of this course, the full code, and some other useful links and articles.
In this course, we are going to learn about natural language processing. We will discuss various concepts such as tokenization, stemming, and lemmatization to process text. We will then discuss how to build a Bag of Words model and use it to classify text. We will see how to use machine learning to analyze the sentiment of a given sentence. We will then discuss topic modeling and implement a system to identify topics in a given document. We will start with simple problems in NLP such as Tokenization Text, Stemming, Lemmatization, Chunks, Bag of Words model. and we will build some real stuff such as :
Learning How to Represent the Meaning of Natural Language Text
Building a category predictor to predict the category of a given text document.
Constructing a gender identifier based on the name.
Building a sentiment analyzer used to determine whether a movie review is positive or negative.
Topic modeling using Latent Dirichlet Allocation
Feature Engineering
Dealing with corpora and WordNet
Dealing With your Vocabulary for any NLP and ML model
TIPS (for getting through the course):
Take handwritten notes. This will drastically increase your ability to retain the information.
Ask lots of questions on the discussion board. The more the better!
Realize that most exercises will take you days or weeks to complete.
Write code yourself, don’t just sit there and look at my code.
You don't know anything about NLP? let's break it down!
I am always available to answer your questions and help you along your data science journey. See you in class!
NOTICE that This course will be modified and I will add new content and new concepts from one time to another, so stay informed! :)