Sentiment Analysis on Amazon Reviews- Natural Language Processing

Introduction to NLP

Learning Outcome

5

Recognize real-world applications of NLP in modern technology.

4

Perform basic text preprocessing using Python libraries.

3

Understand key NLP concepts such as tokens,corpus,and stop words.

2

Identify common NLP tasks like classification and sentiment analysis.

1

Define Natural Language Processing and explain its purpose.

Recall

Deep Learning & The Perceptron

  • We just learned that Neural Networks like ANN and CNN are mathematical engines.
  • They take numerical inputs, multiply them by weights, and calculate a sum.

 What happens if your input is the word "Apple"? You cannot mathematically multiply "Apple" by 0.5.

How do we teach a math-based machine to understand poetry, sarcasm, or a customer review?

Analogy

Imagine You Moving to a New Country

You don’t understand anything.❓

People speak a different language.🗣️

You feel confused.😕

By using two possible scenarios we try to resolve this.

📖 Learns new words

🧠 Understands grammar

❤️ Understands emotions

💬 Understands context

Human Can-

Teaching machines to understand human language
= Natural Language Processing

How Can a Computer Do All This?

Analogy

N

L

P

Natural Language Processing is the subfield of AI focused on the interaction between computers and human language.

The Goal:To read, decipher, understand, and make sense of human languages in a valuable way.

The Intersection:

Computer Science: The programming and algorithms.

Artificial Intelligence: The ability to learn patterns (Machine Learning/Deep Learning).

The Two Pillars of NLP

NLG (Natural Language Generation): The machine's ability to create new, coherent, human-like text.
Example: ChatGPT writing an essay, or an automated system generating a weather report.

NLU (Natural Language Understanding): The machine's ability to comprehend the meaning and intent of text.
Example: Figuring out if an email is Spam or identifying the sentiment of a movie review.

Why is Human Language Hard for AI?

Are we at a river bank or a financial institution?

The bank is closed

 "Oh, fantastic. Another flat tire."

A basic algorithm might see "fantastic" and think the user is happy😊.

"It's raining cats and dogs."

Literal translation models will fail miserably here.

 Words change meaning constantly ("That's sick!").

Programming languages are strict and logical. Human language is messy and rule-breaking.

The NLP Pipeline

1. Text Preprocessing: Cleaning the messy text (removing punctuation, making it lowercase).

2. Text Vectorization: Turning the clean words into numbers (the only thing Neural Networks understand!).

3. Embeddings & Sequence Models: Capturing the context and order of words to build advanced applications.

How do we actually do this?

 Real-World Applications

Summary

4

Before a Deep Learning model can read text, that text must be converted into numerical vectors.​

3

Human language is incredibly complex due to ambiguity, context, and sarcasm.

2

It involves both Understanding (NLU) and Generation (NLG).

1

NLP bridges the gap between human communication and machine mathematics.

Quiz

Why can’t raw text be directly fed into a Neural Network?

A. Text files are too large to process

B. Neural Networks require numerical inputs

C. Machines understand only English

D. Deep Learning is not used for NLP tasks

Quiz

Why can’t raw text be directly fed into a Neural Network?

A. Text files are too large to process

B. Neural Networks require numerical inputs

C. Machines understand only English

D. Deep Learning is not used for NLP tasks

Copy of Artificial Intelligence-Introduction to NLP

By Content ITV

Copy of Artificial Intelligence-Introduction to NLP

  • 10