EIEIOTECHNOVATION
← Training programmes

EIEIO / PROGRAMMING & DEVELOPMENT

Text Mining Sentiment Analysis and NLP using Python

Course outline

3 days

Duration

3 days

Overview

This course introduces you to the field of natural language process (NLP) that deals with natural language understanding and natural language generation. In this course, you will learn the following

  • Learn to work with Text Files with Python
  • Utilize Regular Expressions, for pattern searching in text
  • Fundamentals of Knowledge graph using Zincbase
  • Learn about Stemming and Lemmatization
  • Understand Vocabulary Matching with Spacy
  • Use Part of Speech Tagging to automatically process raw text files
  • Understand Named Entity Recognition
  • Visualize POS and NER with Spacy
  • Use Scikit-Learn for Text Classification
  • Learn about Non-negative Matrix Factorization
  • Use the Word2Vec algorithm using TensorFlow
  • Use NLTK for Sentiment Analysis

Day 1

Topic

Description

Introduction NLP

  • What is NLP?
  • Installing Anaconda Python
  • Installing Anaconda Python - Text
  • Spacey Library
  • A tour of Jupyter Notebook

Regular Expression, Beautiful Soup

  • Introduction to Regular Expressions
  • Finding Patterns in Text
  • Substituting Patterns in Text
  • Shorthand Character Classes
  • Character Ranges – Text
  • Pre-processing using Regex
  • Extracting text from HTML using Beautiful Soup
  • Extract text from PDF, Word using Textract
  • Build knowledge graph using Zincbase

Numpy and Pandas

  • Introduction to Numpy
  • Introduction to Pandas

Day 2

Topic

Description

NLP Core

  • Installing NLTK in Python
  • Tokenizing Words and Sentences
  • How tokenization works? - Text
  • Introduction to Stemming and Lemmatization
  • Stemming using NLTK
  • Lemmatization using NLTK
  • Stop word removal using NLTK
  • Parts Of Speech Tagging
  • POS Tag Meanings
  • Named Entity Recognition
  • Text Modelling using Bag of Words Model
  • Building the BOW Model
  • Text Modelling using TF-IDF Model
  • Understanding the N-Gram Model
  • Understanding Latent Semantic Analysis
  • Word Synonyms and Antonyms using NLTK
  • Word Negation Tracking in Python

Classification

  • Introduction to classification
  • High level overview of Logistic Regression

Project – classify IMDB comments

  • Getting the data for Text Classification
  • Getting the data for Text Classification - Text
  • Importing the dataset
  • Persisting the dataset
  • Pre-processing the data
  • Transforming data into BOW Model
  • Transform BOW model into TF-IDF Model
  • Creating training and test set
  • Understanding Logistic Regression
  • Training our classifier
  • Testing Model performance
  • Saving our Model
  • Importing and using our Model

Day 3

Topic

Description

Lab Exercise - Twitter Sentiment Analysis

  • Setting up Twitter Application
  • Initializing Tokens
  • Client Authentication
  • Fetching real time tweets
  • Loading TF-IDF Model and Classifier
  • Pre-processing the tweets
  • Predicting sentiments of tweets
  • Plotting the results

Text Summarization

  • Understanding Text Summarization
  • Fetching article data from the web
  • Parsing the data using Beautiful Soup
  • Pre-processing the data
  • Tokenizing Article into sentences
  • Building the histogram
  • Calculating the sentence scores
  • Getting the summary

Word2Vec

  • Understanding Word Vectors
  • Use cases of word vectors
  • Importing the data
  • Preparing the data
  • Training the Word2Vec Model
  • Testing Model Performance
  • Improving the Model
  • Exploring Pre-trained Models
  • GloVe dataset
  • Simple neural network models for text generation

Lab Setup

For lab exercises each student needs a laptop or a desktop with standard configuration 8 GB + RAM and i5 CPU. Students will require administrative access to install software. For the lab exercise student will require to install the following software. These software are free open source.

  • Anaconda - latest version for 64bit Python 3.6+
  • TensorFlow
  • Spacy
  • NLTK
  • Scikit
  • Keras
  • Beautiful Soup
  • Textract

Programme scope, delivery arrangements and suitability are confirmed during enquiry.