Lecture 9 - More Bio-Inspired NLP
Lecture 9 - More Bio-Inspired NLP
Lecture 9 - More Bio-Inspired NLP
Intelligent Systems
Lecture 9
More Bio-Inspired Approaches
and Natural Language
Processing
Objectives
On completion of this module, students should be able to:
Bio-inspired
computing
Biological Artificial
computation Intelligence
Bio-Inspired Computing
Bio-Inspired Computing
Motivation
Dealing too complex problems
Incapable to solve by human proposed
solution
Absence of complete mathematical
model
Existing of similar problem in nature
Adaptation
Self-organization
Communication
Optimization
Bio-Inspired Computing
Some areas of bio-inspired computing are:
• genetic algorithm
• particle swarm
• ant colony optimization
• artificial bee colony
• bacterial foraging
• cuckoo search
• Firefly
• leaping frog
• bat algorithm
• flower pollination
• artificial plant optimization
• neural networks
Swarm
Intelligence
Swarm Intelligence
• The SI-based algorithms belong to a wider class of the algorithms, called
the bio-inspired algorithms.
• we can observe that SI-based ⊂ bio-inspired ⊂ nature-inspired.
• Population of simple
agents
• Decentralized
• Self-Organized
• No or local
communication
• Example
Ant/Bee colonies
Bird flocking
Fish schooling
Coordinated Collective Movement
Adaptive Significance
03/25/2024 14
Flash Expansion
Applications:
Pheromones
Ant Behavior
paths
Pheromones evaporate
Avoids being trapped in local optima
Disadvantages
Convergence is guaranteed, but
time to convergence
uncertain
Coding is not straightforward
Summary
Human and Language
• Ambiguities in Language
• “School dropouts cut in half this year”
• “Hospitals Are Sued by 7 Foot Doctors”
• “Include Your Children When Baking Cookies”
• “Kids Make Nutritious Snacks”
• Complexity in Language
• “There is a boy, who lost his toy, who jumped with joy, who
drank the soy, who made everyone annoyed
42
What is NLP?
The process of building computational models for understanding
natural language.
Computer Science
Linguistics
Artificial
Intelligence Computational
Linguistics
Cognitive
Psychology Information
Theory
Psychology
Statistics
44
Where does NLP fit in CS?
45
Common NLP Tasks
Sentence Parsing
Analysing a sentence into its component categories and functions
(refer Slide 6)
Machine Translation (MT)
An automated system that analyzes text from source language
and produces “equivalent” text in the target language
Source Target
Language Language
MT
algorithm
47
Common NLP Tasks
Sentiment Analysis
Identify, analyze and classify opinions in text into categories such
as "positive" , "negative" or “neutral”
“I love Macintosh.” (Positive)
“I hate Blackberry! ” (Negative)
“The food is not bad at all” (Neutral)
“What a great car, it did not start the first day” (Ambiguous)
Co-reference Resolution
Two textual entities that refers to the same object in the “real world”
(Mitkov)
Saha Hisham Ismail1, 45, said poor drainage2 in the village3 was the main cause of
the problem4. “We1,3 have reported it2 to the authorities5 and they5 have promised to
look into it2, but nothing has been done to rectify the problem4.” 48
Common NLP Tasks
Text Summarization
Automatically reducing a text document to create a summary that preserves the most
important points of the original document.
Example : Given a single document, produce abstract, outline and headline.
Topic Categorization
Classifies documents according to their topics
“Serena and Nadal relieved after surviving tough opponents in Madrid”
[Sports]
“Facebook eyes $1billion deal for GPS app Waze” [Technology]
“Property, constructions to lead stock market” [Business]
“All eyes on cabinet lineups” [Politics]
49
Levels of Language Processing and Analysis
Discourse Analysis
Morphological and Lexical
Analysis Pragmatics Analysis
Syntactic Analysis
Semantic Analysis
Semantic Analysis
Pragmatics Analysis
Discourse Analysis Syntactic Analysis
Morphological and
Lexical Analysis
50
Syntactic Analysis- Phrases
Noun Phrase, NP
He is a(ART) policeman(N).
My(N) house(N) is in Gombak.
Verb Phrase, VP
They play(V) street(N) soccer(N)
Perform(V) your(N) prayers(N) 5 times a day
Adjectival Phrase-AP
My grandfather is a slow(ADJ) driver(N)
The delicious(ADJ) meal(N) is gone.
Prepositional Phrase, PP
The astronaut travels to(P) the(DET) moon(N)
The food on(P) the(DET) table(N) is contaminated.
51
Syntactic Analysis- Grammar
52
Syntactic Analysis- Parsing (Example 1)
S
Grammar rules used:
NP VP
S -> NP VP
VP – > V NP
N V NP
NP -> DET N
NP -> N
DET N
53
Syntactic Analysis- Parsing (Example 2)
NP VP S -> NP VP
VP – > V NP
DET N V NP NP -> DET N
NP -> N
DET N
54
Syntactic Analysis- Parsing (Example 3)
S
Grammar rules used:
NP VP
S -> NP VP
VP – > V NP
N V NP
NP -> ART (ADJ) N
NP -> N
ART ADJ N *Note : rules in ( )
are optional
Islam is a beautiful
religion
noun verb article adjective noun
55
Syntactic Analysis- Parsing (Example 4)
S
Grammar rules used:
NP VP
S -> NP VP
VP – > V NP
N V NP
NP -> NP PP
NP -> DET N
NP PP
NP -> ART (ADJ) N
PP -> P NP
DET N P NP NP -> N
*Note : rules in ( )
DET N are optional
He chases the thief with a bicycle
56
Syntactic Analysis- Parsing (Example 5)
S
Grammar rules used:
VP CC VP
S -> VP CC VP
V NP V NP S- > NP VP
VP – > V NP
NP PP NP NP PP
PP -> P NP
P NP NP -> N
N N N
57
Issues in Syntactic Analysis
• Handling ambiguity
• Syntactic ambiguity:
• “Fruit flies like a banana”
• “Fruit flies like a banana”
58
Examples of NLP Applications
Google Translate
59
Examples of NLP Applications
Arabic WordNet
60
Examples of NLP Applications
61
Examples of NLP Applications
Spam Classifier
62
Examples of NLP Applications
63
References
END OF LECTURE 9
What have you learned?
NATURAL LANGUAGE PROCESSING (NLP)
Questions ?