0% found this document useful (0 votes)
16 views32 pages

Introduction To Natural Language Processing

Natural language processing , a topic of computer science

Uploaded by

adilkhang34
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
0% found this document useful (0 votes)
16 views32 pages

Introduction To Natural Language Processing

Natural language processing , a topic of computer science

Uploaded by

adilkhang34
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 32

07/24/2024 1

INTRODUCTION TO NATURAL
LANGUAGE PROCESSING
PREPARED AND COMPILED BY: AHMAD ULLAH
Lecture# 01
07/24/2024 2

Prerequisite
for
Natural language processing

● PYTHON
● BASIC CONCEPT OF MACHINE
LEARNING AND DEEP LEARNING
07/24/2024 3

NATURAL LANGUAGE PROCESSING


07/24/2024 4

NATURAL LANGUAGE PROCESSING


Natural language processing (NLP) is a subfield of linguistics, computer
science, information engineering, and artificial intelligence concerned
with the interactions between computers and human (natural)
languages, in particular how to program computers to process and
analyze large amounts of natural language data.

Challenges in natural language processing frequently involve


speech recognition, natural language understanding, and natural
language generation.
07/24/2024 5

Natural Language Processing


• Natural Language Processing (NLP) is the sub-field of Computer Science
especially Artificial Intelligence (AI) that is concerned about enabling
computers to understand and process human language
• The ultimate goal of NLP is to help computers understand human language as
well as we do
• NLP focuses on communication between computers and humans in
natural language and NLP is all about making computers understand and
generate human language
TYPES OF NLP
07/24/2024 6
07/24/2024 7
NLP WORKING
07/24/2024 8
NLP WORKING
07/24/2024 9
NATURAL LANGUAGE UNDERSTANDING
07/24/2024 10

Ambiguity:
Lexical Ambiguity : The Tank is full of water.
Syntactic Ambiguity : ill men and women get to hospital.
Semantic Ambiguity : The Bike hit the pole while it was running.
Pragmatic Ambiguity : The Army is coming.

Phonology – This science helps to deal with patterns present in the sound and speeches related
to the sound as a physical entity.

Pragmatics – This science studies the different uses of language.

Morphology – This science deals with the structure of the words and the systematic relations
between them.

Syntax – This science deal with the structure of the sentences.

Semantics – This science deals with the literal meaning of the words, phrases as well as
sentences.
07/24/2024 11

Language

• A vocabulary consists of a set of words (wi)


• A text is composed of a sequence of words from a vocabulary
• A language is constructed of a set of all possible texts
• Language is a method of communication with the help of which we can speak,
read and write
07/24/2024 12

WHAT IS NATURAL LANGUAGE PROCESSING?


• Natural language processing studies interactions between humans and
computers to find ways for computers to process written and spoken words
similar to how humans do. The field blends computer science, linguistics and
machine learning.
• Speech recognition — the translation of spoken language into text.
• Natural language understanding — a computer’s ability to understand
language.
• Natural language generation — the generation of natural language by a
computer.
07/24/2024 13

Why Natural Language Processing Is Difficult?


• Understanding human language is considered a difficult task due to its
complexity.
• For example, there are an infinite number of different ways to arrange words
in a sentence
• words can have several meanings and contextual information is necessary to
correctly interpret sentences.
• Every language is more or less unique and ambiguous.
07/24/2024 14

Syntactic and Semantic Analysis


• Syntactic analysis (syntax) and semantic analysis (semantic) are the two
primary techniques that lead to the understanding of natural language.
• Syntax is the grammatical structure of the text, whereas semantics is the
meaning being conveyed.
07/24/2024 15

SYNTACTIC ANALYSIS

• Syntactic analysis, also referred to as syntax analysis or parsing, is the


process of analyzing natural language with the rules of a formal grammar.
Syntactic analysis basically assigns a semantic structure to text.
• For example, a sentence includes a subject and a predicate where the subject
is a noun phrase and the predicate is a verb phrase.
• “The dog (noun phrase) went away (verb phrase).”
07/24/2024 16

SEMANTIC ANALYSIS
• The way we understand what someone has said is an unconscious
process relying on our intuition and knowledge about language itself.
• Understand language is heavily based on meaning and context.
• Semantic analysis is the process of understanding the meaning and
interpretation of words, signs and sentence structure.
• Semantic analysis is one of the toughest parts of natural language
processing and it’s not fully solved yet.
07/24/2024 17

Natural Language Processing Techniques for Understanding Text

• PARSING
• “Resolve a sentence into its component parts and describe their syntactic
roles.”
• Parsing refers to the formal analysis of a sentence by a computer into its
constituents
• A parse tree also provides us with information about the grammatical
relationships of the words due to the structure of their representation.
07/24/2024 18

STEMMING

• Stemming is a technique that comes from morphology and information


retrieval which is used in natural language processing for pre-processing and
efficiency purposes.
• stemming is the process of reducing words to their word stem. A “stem” is the
part of a word that remains after the removal of all affixes. For example, the
stem for the word “touched” is “touch.” "Touch" is also the stem of “touching,”
and so on.
• stem is needed because we’re going to encounter different variations of
words that actually have the same stem and the same meaning.
• For example:
• I was taking a ride in the car.
• I was riding in the car.
07/24/2024 19

TEXT SEGMENTATION

• Text segmentation in natural language processing is the process of


transforming text into meaningful units like words, sentences, different topics,
the underlying intent and more.
• For example, it works relatively well in English to separate words by spaces,
except for words like “icebox” that belong together but are separated by a
space. The problem is that people sometimes also write it as “ice-box.”
07/24/2024 20

Named Entity Recognition

• Named entity recognition (NER) concentrates on determining which items in a


text (i.e. the “named entities”) can be located and classified into predefined
categories.
• These categories can range from the names of persons, organizations and
locations to monetary values and percentages.
• For example:
• The OIC meeting was held in Islamabad.(OIC)
• IEEE, Karachi etc.
07/24/2024 21

Relationship Extraction

• Relationship extraction takes the named entities and tries to identify the
semantic relationships between them.
• This could mean, for example, finding out who is teaches to whom, that a
person works for a specific company and so on.
07/24/2024 22

Sentiment Analysis

• Sentiment analysis we want to determine the attitude (i.e. the sentiment) of a


speaker or writer with respect to a document, interaction or event.
• It is a natural language processing problem where text needs to be understood
in order to predict the underlying intent.
• The sentiment is mostly categorized into positive, negative and neutral
categories.
• we may want to predict a customer’s opinion and attitude about a product
based on a review they wrote.
• Sentiment analysis is widely applied to reviews, surveys, documents and
much more.
07/24/2024 23

APPLICATION OF NLP
• Spell and Grammar Checking
Checking spelling and grammar
Suggesting alternatives for the errors
07/24/2024 24

Word Prediction

• Predicting the next word that is highly probable to be typed by the user
07/24/2024 25

Information Retrieval

• Finding relevant information to the user’s query


07/24/2024 26

Machine Translation

• Translating a text from one language to another


07/24/2024 27

Sentiment Analysis

• Identifying sentiments and opinions stated in a text


07/24/2024 28

Optical Character Recognition

• Recognizing printed or handwritten texts and converting them


to computer-readable texts
07/24/2024 29

Speech recognition

• Recognizing a spoken language and transforming it into a text


07/24/2024 30

NLP
• Speech synthesis
Producing a spoken language from a text
• Spoken dialog systems
Running a dialog between the user and the system
• Google Assistant is one of the best example of NLP.
07/24/2024 31

APPLICATIONS
07/24/2024 32

USED BY

You might also like