Easy Natural Language Processing (NLP) in Python

A-Z guide to practical NLP: spam detection, sentiment analysis, article spinners, and latent semantic analysis.
4.6 (190 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
2,002 students enrolled Bestselling in NLP
$19
$120
84% off
Take This Course
  • Lectures 19
  • Length 2 hours
  • Skill Level All Levels
  • Languages English, captions
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 2/2016 English Closed captions available

Course Description

In this course you will build MULTIPLE practical systems using natural language processing, or NLP - the branch of machine learning and data science that deals with text and speech. This course is not part of my deep learning series, so there are no mathematical prerequisites - just straight up coding in Python. All the materials for this course are FREE.

After a brief discussion about what NLP is and what it can do, we will begin building very useful stuff. The first thing we'll build is a spam detector. You likely get very little spam these days, compared to say, the early 2000s, because of systems like these.

Next we'll build a model for sentiment analysis in Python. This is something that allows us to assign a score to a block of text that tells us how positive or negative it is. People have used sentiment analysis on Twitter to predict the stock market.

We'll go over some practical tools and techniques like the NLTK (natural language toolkit) library and latent semantic analysis or LSA.

Finally, we end the course by building an article spinner. This is a very hard problem and even the most popular products out there these days don't get it right. These lectures are designed to just get you started and to give you ideas for how you might improve on them yourself. Once mastered, you can use it as an SEO, or search engine optimization tool. Internet marketers everywhere will love you if you can do this for them!

This course focuses on "how to build and understand", not just "how to use". Anyone can learn to use an API in 15 minutes after reading some documentation. It's not about "remembering facts", it's about "seeing for yourself" via experimentation. It will teach you how to visualize what's happening in the model internally. If you want more than just a superficial look at machine learning models, this course is for you.


NOTES:

All the code for this course can be downloaded from my github: /lazyprogrammer/machine_learning_examples

In the directory: nlp_class

Make sure you always "git pull" so you have the latest version!


HARD PREREQUISITES / KNOWLEDGE YOU ARE ASSUMED TO HAVE:

  • calculus
  • linear algebra
  • probability
  • Python coding: if/else, loops, lists, dicts, sets
  • Numpy coding: matrix and vector operations, loading a CSV file
  • Sci-Kit Learn API


TIPS (for getting through the course):

  • Watch it at 2x.
  • 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.


USEFUL COURSE ORDERING:

  • (The Numpy Stack in Python)
  • Linear Regression in Python
  • Logistic Regression in Python
  • (Supervised Machine Learning in Python)
  • Deep Learning in Python
  • Practical Deep Learning in Theano and TensorFlow
  • Convolutional Neural Networks in Python
  • (Easy NLP)
  • (Cluster Analysis and Unsupervised Machine Learning)
  • Unsupervised Deep Learning
  • (Hidden Markov Models)
  • Recurrent Neural Networks in Python
  • Natural Language Processing with Deep Learning in Python


What are the requirements?

  • Install Python, it's free!
  • You should be at least somewhat comfortable writing Python code
  • Install numerical libraries for Python such as Numpy, Scipy, Scikit-learn, Matplotlib, and BeautifulSoup

What am I going to get from this course?

  • Write your own spam detection code in Python
  • Write your own sentiment analysis code in Python
  • Perform latent semantic analysis or latent semantic indexing in Python
  • Have an idea of how to write your own article spinner in Python

What is the target audience?

  • Students who are comfortable writing Python code, using loops, lists, dictionaries, etc.
  • Students who want to learn more about machine learning but don't want to do a lot of math
  • Professionals who are interested in applying machine learning and NLP to practical problems like spam detection, Internet marketing, and sentiment analysis

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Natural Language Processing - What is it used for?
Introduction and Outline
Preview
03:04
06:40

NLP is very practical, so it's worth listing out what it is used for. Here we give brief overviews of things like spam detection, POS tagging, NER, sentiment analysis, machine translation, summarization, the Turing test, and more.

02:30

In this lecture some examples of ambiguity of language are given, to make it clear why NLP is not a straightforward problem.

Section 2: Build your own spam detector
Build your own spam detector - description of data
02:08
Build your own spam detector - the code
Preview
06:16
01:30

In addition to the word frequencies we looked at previously, this lecture looks at bag-of-words in general and different ways to implement that, including raw counts and binary indicator variables. We also briefly mention TF-IDF.

Section 3: Build your own sentiment analyzer
03:12

What is sentiment analysis? In this lecture we'll look at the data we'll be using to build our sentiment analysis tool, and talk about how we can manually pre-process the data so that we can plug it into a machine learning classifier.

19:48

In this lecture we'll write our sentiment analyzer in Python to predict sentiment on Amazon reviews.

Section 4: NLTK Exploration
02:00

How do we tag the tokens of a sentence by their parts-of-speech? i.e. Is this token a noun, verb, adjective, adverb, or something else?

02:05

How do we turn words into their "base form"? i.e. plural to singular

03:13

Can we also tag parts of a sentence as a "person", "organization", or "location"?

Section 5: Latent Semantic Analysis
02:30

What is synonymy and polysemy and how can LSA / LSI help?

PCA and SVD - The underlying math behind LSA
07:59
Latent Semantic Analysis in Python
10:08
Section 6: Write your own article spinner
02:43

What is article spinning and how is it related to search engines, SEO (search engine optimization), and Internet marketing?

02:11

What will be our strategy for creating an article spinner? We'll create a trigram model.

Writing an article spinner in Python
11:33
Section 7: How to learn more about NLP
02:45

Important NLP topics you should "know of" but that we didn't cover, and where you can learn more.

Section 8: Appendix
How to install Numpy, Scipy, Matplotlib, Pandas, IPython, Theano, and TensorFlow
17:22

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Lazy Programmer Inc., Data scientist and big data engineer

I am a data scientist, big data engineer, and full stack software engineer.

For my masters thesis I worked on brain-computer interfaces using machine learning. These assist non-verbal and non-mobile persons communicate with their family and caregivers.

I have worked in online advertising and digital media as both a data scientist and big data engineer, and built various high-throughput web services around said data. I've created new big data pipelines using Hadoop/Pig/MapReduce. I've created machine learning models to predict click-through rate, news feed recommender systems using linear regression, Bayesian Bandits, and collaborative filtering and validated the results using A/B testing.

I have taught undergraduate and graduate students in data science, statistics, machine learning, algorithms, calculus, computer graphics, and physics for students attending universities such as Columbia University, NYU, Humber College, and The New School. 

Multiple businesses have benefitted from my web programming expertise. I do all the backend (server), frontend (HTML/JS/CSS), and operations/deployment work. Some of the technologies I've used are: Python, Ruby/Rails, PHP, Bootstrap, jQuery (Javascript), Backbone, and Angular. For storage/databases I've used MySQL, Postgres, Redis, MongoDB, and more.

Ready to start learning?
Take This Course