LECTURE 8
Natural Language Processing
NLP
Instructor : Yousef Aburawi
Cs411 -Artificial Intelligence
Misurata University
Faculty of Information Technology
Spring 2022/2023
Natural Language Processing (NLP)
 NLP stands for Natural Language Processing, which is a part
of Computer Science, Human language, and Artificial
Intelligence. It is the technology that is used by machines to
understand, analyze, manipulate, and interpret human's
languages.
 Getting computers to do reasonably intelligent things with
human language is the domain of Natural Language
Processing (or Computational Linguistics or Human
Language Technology)
Natural Language Processing (NLP)
1-3
Language Analysis: The Science (Linguistics)
 Language is a multi-layered phenomenon
 To some useful extent these layers can be studied independently
 There need to be interfaces between layers.
 There are areas of overlap between layers.
The Language Layers
 L1: Phonology: The noises you make and understand.
 L2: Morphology: What you know about the structure of the words in
your language, including their derivational and inflectional behavior.
 L3: Syntax: What you know about the order and constituency of the
utterances you spout.
The Language Layers
 L4: Semantics: (Meaning), What is the connection between language
and the world (Truth/Knowledge).
 L5: Pragmatics: How language is used by speakers, as opposed to
what things mean.
 L6: Discourse: Dealing with larger chunks of language and language in
context.
1-6
Components of NLP
 Natural Language Understanding (NLU):
 Natural Language Understanding (NLU) helps the machine to understand
and analyze human language by extracting the metadata from content such
as concepts, entities, keywords, emotion, relations, and semantic roles.
 NLU mainly used in Business applications to understand the customer's
problem in both spoken and written language.
 Natural Language Generation (NLG):
 Natural Language Generation (NLG) acts as a translator that converts the
computerized data into natural language representation. It mainly involves
Text planning, Sentence planning, and Text Realization.
1-7
Components of NLP
NLU NLG
NLU is the process of reading and
interpreting language.
NLG is the process of writing or
generating language.
It produces non-linguistic outputs
from natural language inputs.
It produces constructing natural
language outputs from non-
linguistic inputs.
1-8
Applications of NLP
 Applications of NLP can be include:
 Machine translation.  Information extraction.
 Automatic summarization.  Named Entity Recognition (NER).
 Relationship extraction.  Topic segmentation.
 Question answering.  Speech recognition.
 Spelling correction.  OCR.
 Grammar checkers.
NLP Applications: Question Answering
 Question Answering focuses on building systems that automatically
answer the questions asked by humans in a natural language.
1-10
NLP Applications: Spam Detection
 Spam detection is used to detect unwanted e-mails getting to a
user's inbox.
1-11
NLP Applications: Sentiment Analysis
 Sentiment Analysis is also known as opinion mining. It is used on the
web to analyze the attitude, behavior, and emotional state of the
sender. This application is implemented through a combination of
NLP (Natural Language Processing) and statistics by assigning the
values to the text (positive, negative, or natural), identify the mood
of the context (happy, sad, angry, etc.)
1-12
NLP Applications: Machine Translation
 Machine translation is used to translate text or speech from one
natural language to another natural language.
1-13
NLP Applications: Spelling correction
 Microsoft Corporation provides word processor software like MS-
word, PowerPoint for the spelling correction.
1-14
NLP Applications: Chatbot
 Implementing the Chatbot is one of the important applications of
NLP. It is used by many companies to provide the customer's chat
services.
1-15
Phases of NLP
1-16
How to build an NLP pipeline
 Step1: Sentence Segmentation:
 Sentence Segment is the first step for building the NLP pipeline. It breaks
the paragraph into separate sentences.
 Step2: Word Tokenization:
 Word Tokenizer is used to break the sentence into separate words or tokens.
 Example:
 JavaTpoint offers Corporate Training, Summer Training, Online Training, and Winter
Training.
 Word Tokenizer generates the following result:
"JavaTpoint", "offers", "Corporate", "Training", "Summer", "Training", "Online",
"Training", "and", "Winter", "Training", "."
1-17
How to build an NLP pipeline
 Step3: Stemming:
 Stemming is used to normalize words into its base form or root form. For
example, celebrates, celebrated and celebrating, all these words are
originated with a single root word "celebrate." The big problem with
stemming is that sometimes it produces the root word which may not have
any meaning.
 For Example, intelligence, intelligent, and intelligently, all these words are
originated with a single root word "intelligen." In English, the word
"intelligen" do not have any meaning.
1-18
How to build an NLP pipeline
 Step 4: Lemmatization:
 Lemmatization is quite similar to the Stemming. It is used to group
different inflected forms of the word, called Lemma. The main difference
between Stemming and lemmatization is that it produces the root word,
which has a meaning.
 For example: In lemmatization, the words intelligence, intelligent, and
intelligently has a root word intelligent, which has a meaning.
1-19
How to build an NLP pipeline
 Step 5: Identifying Stop Words:
 In English, there are a lot of words that appear very frequently like "is",
"and", "the", and "a". NLP pipelines will flag these words as stop
words. Stop words might be filtered out before doing any statistical
analysis.
 Example: He is a good boy.
 Step 6: Dependency Parsing:
 Dependency Parsing is used to find that how all the words in the sentence
are related to each other.
1-20
How to build an NLP pipeline
 Step 7: POS tags:
 POS stands for parts of speech, which includes Noun, verb, adverb, and
Adjective. It indicates that how a word functions with its meaning as well
as grammatically within the sentences. A word has one or more parts of
speech based on the context in which it is used.
 Example: "Google" something on the Internet.
In the above example, Google is used as a verb, although it is a proper noun.
1-21
How to build an NLP pipeline
 Step 8: Named Entity Recognition (NER)
 Named Entity Recognition (NER) is the process of detecting the named
entity such as person name, movie name, organization name, or location.
 Example: Steve Jobs introduced iPhone at the Macworld Conference
in San Francisco, California.
1-22
Why NLP is difficult?
 NLP is difficult because Ambiguity and Uncertainty exist in the
language.
 There are the following three ambiguity -
1. Lexical Ambiguity
 Lexical Ambiguity exists in the presence of two or more possible meanings of the
sentence within a single word.
2. Syntactic Ambiguity
 Syntactic Ambiguity exists in the presence of two or more possible meanings
within the sentence.
 Example:
 I saw the girl with the binocular.
 In the above example, did I have the binoculars? Or did the girl have the binoculars?
1-23
Why NLP is difficult?
3. Referential Ambiguity
 Referential Ambiguity exists when you are referring to something using the
pronoun.
 Example: Kiran went to Sunita. She said, "I am hungry."
1-24
Readings
 Chapters 23 of Textbox.
1-25
The End

More Related Content

PDF
Natural language processing and its application in ai
PDF
NLP in artificial intelligence .pdf
PPTX
Unit 1 Natural Language Procerssing.pptx
PPTX
Natural-Language-Processing -Stages and application area.pptx
PPTX
Natural Language Processing 20 March.pptx
PDF
Natural Language Processing for development
PDF
NLP slides introduction, a basic introduction and application
PPTX
Natural Language Processing (NLP).pptx
Natural language processing and its application in ai
NLP in artificial intelligence .pdf
Unit 1 Natural Language Procerssing.pptx
Natural-Language-Processing -Stages and application area.pptx
Natural Language Processing 20 March.pptx
Natural Language Processing for development
NLP slides introduction, a basic introduction and application
Natural Language Processing (NLP).pptx

Similar to AI_08_NLP.pptx (20)

DOCX
Natural language processing
PPTX
NATURAL LANGUAGE PROCESSING.pptx
PDF
Natural language processing (nlp)
PPTX
LONGSEM2024-25_CSE3015_ETH_AP2024256000125_Reference-Material-I.pptx
PDF
Natural language processing
PPTX
Natural Language Processing
PPTX
Natural Language Processing.pptx
PDF
Natural Language Processing from Object Automation
PPTX
Introduction to natural language processing (NLP)
PPTX
Natural Language Processing - Lecture.pptx
PDF
UAJK NLP Lecture-1incluiding all details here.pdf
PPTX
Module 1-NLP (2).pptxiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
PPTX
Natural language processing (NLP)
PPTX
NATURAL LANGUAGE PROCESSING AA PPT1.pptx
PDF
Introduction to natural language processing
PPTX
Natural language processing
PPTX
Unlocking the Power of Language: A Beginner’s Guide to Natural Language Proce...
PPTX
NLP Introduction for engineering stuedents.pptx
PPTX
Natural Language Processing-(NLP).pptx
Natural language processing
NATURAL LANGUAGE PROCESSING.pptx
Natural language processing (nlp)
LONGSEM2024-25_CSE3015_ETH_AP2024256000125_Reference-Material-I.pptx
Natural language processing
Natural Language Processing
Natural Language Processing.pptx
Natural Language Processing from Object Automation
Introduction to natural language processing (NLP)
Natural Language Processing - Lecture.pptx
UAJK NLP Lecture-1incluiding all details here.pdf
Module 1-NLP (2).pptxiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
Natural language processing (NLP)
NATURAL LANGUAGE PROCESSING AA PPT1.pptx
Introduction to natural language processing
Natural language processing
Unlocking the Power of Language: A Beginner’s Guide to Natural Language Proce...
NLP Introduction for engineering stuedents.pptx
Natural Language Processing-(NLP).pptx
Ad

More from Yousef Aburawi (7)

PPTX
AI_07_Deep Learning.pptx
PPTX
AI_06_Machine Learning.pptx
PPTX
AI_05_First Order Logic.pptx
PPTX
AI_04_Logical Agents.pptx
PPTX
AI_03_Solving Problems by Searching.pptx
PPTX
AI_02_Intelligent Agents.pptx
PPTX
AI_01_introduction.pptx
AI_07_Deep Learning.pptx
AI_06_Machine Learning.pptx
AI_05_First Order Logic.pptx
AI_04_Logical Agents.pptx
AI_03_Solving Problems by Searching.pptx
AI_02_Intelligent Agents.pptx
AI_01_introduction.pptx
Ad

Recently uploaded (20)

DOCX
search engine optimization ppt fir known well about this
PPTX
TEXTILE technology diploma scope and career opportunities
PDF
UiPath Agentic Automation session 1: RPA to Agents
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
Architecture types and enterprise applications.pdf
PDF
Flame analysis and combustion estimation using large language and vision assi...
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Comparative analysis of machine learning models for fake news detection in so...
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PPTX
Microsoft Excel 365/2024 Beginner's training
PPTX
Build Your First AI Agent with UiPath.pptx
PPT
What is a Computer? Input Devices /output devices
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
search engine optimization ppt fir known well about this
TEXTILE technology diploma scope and career opportunities
UiPath Agentic Automation session 1: RPA to Agents
Module 1.ppt Iot fundamentals and Architecture
Credit Without Borders: AI and Financial Inclusion in Bangladesh
The influence of sentiment analysis in enhancing early warning system model f...
Architecture types and enterprise applications.pdf
Flame analysis and combustion estimation using large language and vision assi...
Zenith AI: Advanced Artificial Intelligence
Comparative analysis of machine learning models for fake news detection in so...
Final SEM Unit 1 for mit wpu at pune .pptx
OpenACC and Open Hackathons Monthly Highlights July 2025
Microsoft Excel 365/2024 Beginner's training
Build Your First AI Agent with UiPath.pptx
What is a Computer? Input Devices /output devices
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
sbt 2.0: go big (Scala Days 2025 edition)
Developing a website for English-speaking practice to English as a foreign la...
A contest of sentiment analysis: k-nearest neighbor versus neural network

AI_08_NLP.pptx

  • 1. LECTURE 8 Natural Language Processing NLP Instructor : Yousef Aburawi Cs411 -Artificial Intelligence Misurata University Faculty of Information Technology Spring 2022/2023
  • 2. Natural Language Processing (NLP)  NLP stands for Natural Language Processing, which is a part of Computer Science, Human language, and Artificial Intelligence. It is the technology that is used by machines to understand, analyze, manipulate, and interpret human's languages.  Getting computers to do reasonably intelligent things with human language is the domain of Natural Language Processing (or Computational Linguistics or Human Language Technology)
  • 4. Language Analysis: The Science (Linguistics)  Language is a multi-layered phenomenon  To some useful extent these layers can be studied independently  There need to be interfaces between layers.  There are areas of overlap between layers.
  • 5. The Language Layers  L1: Phonology: The noises you make and understand.  L2: Morphology: What you know about the structure of the words in your language, including their derivational and inflectional behavior.  L3: Syntax: What you know about the order and constituency of the utterances you spout.
  • 6. The Language Layers  L4: Semantics: (Meaning), What is the connection between language and the world (Truth/Knowledge).  L5: Pragmatics: How language is used by speakers, as opposed to what things mean.  L6: Discourse: Dealing with larger chunks of language and language in context. 1-6
  • 7. Components of NLP  Natural Language Understanding (NLU):  Natural Language Understanding (NLU) helps the machine to understand and analyze human language by extracting the metadata from content such as concepts, entities, keywords, emotion, relations, and semantic roles.  NLU mainly used in Business applications to understand the customer's problem in both spoken and written language.  Natural Language Generation (NLG):  Natural Language Generation (NLG) acts as a translator that converts the computerized data into natural language representation. It mainly involves Text planning, Sentence planning, and Text Realization. 1-7
  • 8. Components of NLP NLU NLG NLU is the process of reading and interpreting language. NLG is the process of writing or generating language. It produces non-linguistic outputs from natural language inputs. It produces constructing natural language outputs from non- linguistic inputs. 1-8
  • 9. Applications of NLP  Applications of NLP can be include:  Machine translation.  Information extraction.  Automatic summarization.  Named Entity Recognition (NER).  Relationship extraction.  Topic segmentation.  Question answering.  Speech recognition.  Spelling correction.  OCR.  Grammar checkers.
  • 10. NLP Applications: Question Answering  Question Answering focuses on building systems that automatically answer the questions asked by humans in a natural language. 1-10
  • 11. NLP Applications: Spam Detection  Spam detection is used to detect unwanted e-mails getting to a user's inbox. 1-11
  • 12. NLP Applications: Sentiment Analysis  Sentiment Analysis is also known as opinion mining. It is used on the web to analyze the attitude, behavior, and emotional state of the sender. This application is implemented through a combination of NLP (Natural Language Processing) and statistics by assigning the values to the text (positive, negative, or natural), identify the mood of the context (happy, sad, angry, etc.) 1-12
  • 13. NLP Applications: Machine Translation  Machine translation is used to translate text or speech from one natural language to another natural language. 1-13
  • 14. NLP Applications: Spelling correction  Microsoft Corporation provides word processor software like MS- word, PowerPoint for the spelling correction. 1-14
  • 15. NLP Applications: Chatbot  Implementing the Chatbot is one of the important applications of NLP. It is used by many companies to provide the customer's chat services. 1-15
  • 17. How to build an NLP pipeline  Step1: Sentence Segmentation:  Sentence Segment is the first step for building the NLP pipeline. It breaks the paragraph into separate sentences.  Step2: Word Tokenization:  Word Tokenizer is used to break the sentence into separate words or tokens.  Example:  JavaTpoint offers Corporate Training, Summer Training, Online Training, and Winter Training.  Word Tokenizer generates the following result: "JavaTpoint", "offers", "Corporate", "Training", "Summer", "Training", "Online", "Training", "and", "Winter", "Training", "." 1-17
  • 18. How to build an NLP pipeline  Step3: Stemming:  Stemming is used to normalize words into its base form or root form. For example, celebrates, celebrated and celebrating, all these words are originated with a single root word "celebrate." The big problem with stemming is that sometimes it produces the root word which may not have any meaning.  For Example, intelligence, intelligent, and intelligently, all these words are originated with a single root word "intelligen." In English, the word "intelligen" do not have any meaning. 1-18
  • 19. How to build an NLP pipeline  Step 4: Lemmatization:  Lemmatization is quite similar to the Stemming. It is used to group different inflected forms of the word, called Lemma. The main difference between Stemming and lemmatization is that it produces the root word, which has a meaning.  For example: In lemmatization, the words intelligence, intelligent, and intelligently has a root word intelligent, which has a meaning. 1-19
  • 20. How to build an NLP pipeline  Step 5: Identifying Stop Words:  In English, there are a lot of words that appear very frequently like "is", "and", "the", and "a". NLP pipelines will flag these words as stop words. Stop words might be filtered out before doing any statistical analysis.  Example: He is a good boy.  Step 6: Dependency Parsing:  Dependency Parsing is used to find that how all the words in the sentence are related to each other. 1-20
  • 21. How to build an NLP pipeline  Step 7: POS tags:  POS stands for parts of speech, which includes Noun, verb, adverb, and Adjective. It indicates that how a word functions with its meaning as well as grammatically within the sentences. A word has one or more parts of speech based on the context in which it is used.  Example: "Google" something on the Internet. In the above example, Google is used as a verb, although it is a proper noun. 1-21
  • 22. How to build an NLP pipeline  Step 8: Named Entity Recognition (NER)  Named Entity Recognition (NER) is the process of detecting the named entity such as person name, movie name, organization name, or location.  Example: Steve Jobs introduced iPhone at the Macworld Conference in San Francisco, California. 1-22
  • 23. Why NLP is difficult?  NLP is difficult because Ambiguity and Uncertainty exist in the language.  There are the following three ambiguity - 1. Lexical Ambiguity  Lexical Ambiguity exists in the presence of two or more possible meanings of the sentence within a single word. 2. Syntactic Ambiguity  Syntactic Ambiguity exists in the presence of two or more possible meanings within the sentence.  Example:  I saw the girl with the binocular.  In the above example, did I have the binoculars? Or did the girl have the binoculars? 1-23
  • 24. Why NLP is difficult? 3. Referential Ambiguity  Referential Ambiguity exists when you are referring to something using the pronoun.  Example: Kiran went to Sunita. She said, "I am hungry." 1-24
  • 25. Readings  Chapters 23 of Textbox. 1-25