SlideShare uma empresa Scribd logo
1 de 49
Artificial Intelligence
Natural Language Processing:
Parsing

Rushdi Shams
Computational Linguistics Lab
Western University.
rshams@uwo.ca
Natural Language
• Natural Language means any language we
speak
• We need to process natural language (in
text, speech, etc.) so that machine can
exploit it.
• Applications: numerous!
– Watson (Jeopardy)
– MS Word
Parsing
• The first task for any NLP-based system is to
read (or to parse) the text
• Parsing depends on three components of a
language1. Lexicon
2. Categorization
3. Grammar Rules
Lexicon
stench | breeze | glitter | nothing | wumpus | pit | pits | gold | east | ..
is | see | smell | shoot | feel | stinks | go | grab | carry | kill | turn | …
right | left | east | south | back | smelly | …
here | there | nearby | ahead | right | left | east | south | back | …
me | you | I | it | S=HE | Y’ALL …
John | Mary | Boston | UCB | PAJC | …
the | a | an | …
to | in | on | near | …
and | or | but | …

0|1|2|3|4|5|6|7|8|9

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

4
Categorization
Noun > stench | breeze | glitter | nothing | wumpus | pit | pits | gold | east | ..
Verb > is | see | smell | shoot | feel | stinks | go | grab | carry | kill | turn | …
Adjective > right | left | east | south | back | smelly | …
Adverb > here | there | nearby | ahead | right | left | east | south | back | …
Pronoun > me | you | I | it | S=HE | Y’ALL …
Name > John | Mary | Boston | UCB | PAJC | …
Article > the | a | an | …
Preposition > to | in | on | near | …
Conjunction > and | or | but | …

Digit > 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

5
Grammar Rules
• “The large cat”
• This phrase can be parsed by an NLP-system if
it has a grammar like
Noun Phrase -> Determiner + Adjective + Noun

• If your system finds a phrase or sentence that
has a pattern not mentioned in its set of
Grammar Rules it won’t be able to parse
them.
Therefore...
• Parsing is the process of using grammar
rules to determine whether a sentence is
legal,
• and to obtain its Syntactic Tree

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

7
Syntactic Tree
‘The large cat eats the small rat’

http://www.digitalenema.com/2012_07_01_archive.html
Syntactic Tree

The

large

cat

eats

the

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

small

rat

9
Syntactic Tree

Article adjective noun

Verb
Article adjective noun

The

large

cat

eats

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

the

small

rat

10
Syntactic Tree

Article adjective noun

Verb

noun phrase
Article adjective noun

The

large

cat

eats

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

the

small

rat

11
Syntactic Tree
Noun phrase

Article adjective noun

Verb

noun phrase
Article adjective noun

The

large

cat

eats

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

the

small

rat

12
Syntactic Tree
Noun phrase

verb phrase

Article adjective noun

Verb

noun phrase
Article adjective noun

The

large

cat

eats

the

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

small

rat

13
Syntactic Tree
sentence

Noun phrase

verb phrase

Article adjective noun

Verb

noun phrase
Article adjective noun

The

large

cat

eats

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

the

small

rat

14
Label Bracketing
• It is a process of representing the syntactic tree in another way.

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

15
Do yourself: Label Bracket the tree

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

16
Evaluation of Parsing
• The two most frequent and basic measures to
evaluate parsing:

17
Precision, Recall, and F1-Score
• The notions are much clearer with a
contingency table-

18
Evaluation of Parsing
However…

http://www.cafepress.com/barrysworld/1486105
And…
Ambiguity
• There are 2 types of ambiguity1. Lexical Ambiguity: Sentence contains an
idiom/word/term that has more than one
meaning.
Glasses means both drinking glasses and
spectacles

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

24
Ambiguity
2. Structural Ambiguity: Sentence has more
than one syntactic tree
I saw the boy with the telescope

Did you see the boy with a telescope? Or
Did you see the boy who was having a
telescope?
Rushdi Shams, Dept of CSE, KUET,
Bangladesh

25
Structural Ambiguity

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

26
Ambiguity
• Which of the following examples have
lexical ambiguity and which of them carry
structural ambiguity; justify1. The painter put on another coat
2. We like flying planes
3. Visiting relatives can be tiresome

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

27
Ambiguity
• He wrote the note yesterday
• You mean you carried the information by a
bus?
• Connecting wires are tiring in electronics lab
• Squad helps dog bite victim

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

28
Word Sense
• Most of the lexical ambiguity arises from the
differences in word sense.
• Word senses vary due to several factors:
– Synonymy
– Antonymy
– Homonymy
– Polysemy and
– Heteronymy
Synonymy
• Synonyms are different words (or sometimes
phrases) with identical or very similar
meanings.
• Words that are synonyms are said to
be synonymous, and the state of being a
synonym is called synonymy

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

30
Synonymy
•
•
•
•
•

student and pupil (noun)
buy and purchase (verb)
sick and ill (adjective)
quickly and speedily (adverb)
on and upon (preposition)

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

31
Synonymy is a relation between senses
rather than words
• Note that synonyms are defined with respect
to certain senses of words
• pupil as the "aperture in the iris of the eye" is
not synonymous with student.
• Similarly, he expired means the same as he
died, yet my passport has expired cannot be
replaced by my passport has died.

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

32
Synonymy is a relation between senses
rather than words
• Consider the words big and large
• Are they synonyms?:
– How big is the plane?
– Are we travelling with a large or small plane?

• How about?:
– Mrs Benjamin became a big sister of him
– Mrs Benjamin became a large sister of him
Heteronymy
• heteronyms (also known as heterophones)
are words with
– identical spellings (or characters)
– but different pronunciations and meanings.

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

34
Antonymy
• Antonyms are words with opposite or nearly
opposite meanings.
• short and tall
• dead and alive
• increase and decrease

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

35
Homonymy
• A homonym is one of a group of words that
– share the same spelling but
– Have different distinct meaning
• Bank (Financial Institute) vs Bank (Sloping Land)
• Bat (A club for hitting the ball) vs Bat (Mammal)

• Homographs (Bank/Bank, Bat/Bat)
• Homophones (Right/Write, Piece/Peace)

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

36
Polysemy
• Homonymous words that are related with
each other
– The bank was constructed in 1971 (building
related to a financial institute)
– I draw money from the bank (financial institute)
Hypernymy and Hyponymy
• Superclass-subclass structure
– Car is a hypernym of Honda
– Honda is a hyponym of Car
Zeugma Test
• A test to see whether or not two words have
the same sense
– Which flight does serve breakfast?
– Does Lufthansa serve Philadelphia?

• Simply make a conjunction:
– Does Lufthansa serve breakfast and Philadelphia?
WordNet 3.0
• A hierarchically organized lexical database
• On-line thesaurus + aspects of a dictionary
• Some other languages available or under development
– (Arabic, Finnish, German, Portuguese…)

Category

Unique Strings

Noun

117,798

Verb

11,529

Adjective

22,479

Adverb

4,481
Senses of “bass” in Wordnet
WordNet Hypernym Hierarchy for
“bass”
WordNet Noun Relations
WordNet 3.0
• Where it is:
– http://wordnetweb.princeton.edu/perl/webwn

• Libraries
– Python: WordNet from NLTK
• http://www.nltk.org/Home
– Java:
• JWNL, extJWNL on sourceforge
Difficulties with Natural Language:
Anaphora
• Using pronouns to refer back to entities already
introduced in the text
– After Mary proposed to John, they found a preacher
and got married. For the honeymoon, they went to
Hawaii
– Mary saw a ring through the window and asked John
for it
– Mary threw a rock at the window and broke it

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

45
Difficulties with Natural Language:
Indexicality
• Indexical sentences refer to utterance
situation (place, time, etc.)
– I am over here
– Why did you do that?

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

46
Difficulties with Natural Language:
Metonymy
• Using one noun phrase to stand for another
– I've read Shakespeare
– Chrysler announced record profits
– The ham sandwich on Table 4 wants another
beer

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

47
Difficulties with Natural Language:
Metaphor
• “Non-literal" usage of words and phrases,
often systematic.
– I've tried killing the process but it won't die. Its
parent keeps it alive.

Rushdi Shams, Dept of CSE, KUET,
Bangladesh

48
Summary
• The components of a language
– Lexicon
– Categorization
– Grammar rules

•
•
•
•
•

Syntactic Tree
Label Bracketing
Evaluation of Parsing
Word sense
Problem of Parsing

Mais conteúdo relacionado

Mais procurados

Propositional logic
Propositional logicPropositional logic
Propositional logicRushdi Shams
 
Chapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata TheoryChapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata TheoryTsegazeab Asgedom
 
Context free grammars
Context free grammarsContext free grammars
Context free grammarsRonak Thakkar
 
Lecture: Word Sense Disambiguation
Lecture: Word Sense DisambiguationLecture: Word Sense Disambiguation
Lecture: Word Sense DisambiguationMarina Santini
 
Natural Language processing Parts of speech tagging, its classes, and how to ...
Natural Language processing Parts of speech tagging, its classes, and how to ...Natural Language processing Parts of speech tagging, its classes, and how to ...
Natural Language processing Parts of speech tagging, its classes, and how to ...Rajnish Raj
 
Knowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and ReasoningKnowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and ReasoningSagacious IT Solution
 
Lecture Notes-Finite State Automata for NLP.pdf
Lecture Notes-Finite State Automata for NLP.pdfLecture Notes-Finite State Automata for NLP.pdf
Lecture Notes-Finite State Automata for NLP.pdfDeptii Chaudhari
 
Applied Artificial Intelligence Unit 4 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 4 Semester 3 MSc IT Part 2 Mumbai Univer...Applied Artificial Intelligence Unit 4 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 4 Semester 3 MSc IT Part 2 Mumbai Univer...Madhav Mishra
 
Text similarity measures
Text similarity measuresText similarity measures
Text similarity measuresankit_ppt
 
Applied Artificial Intelligence Unit 1 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 1 Semester 3 MSc IT Part 2 Mumbai Univer...Applied Artificial Intelligence Unit 1 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 1 Semester 3 MSc IT Part 2 Mumbai Univer...Madhav Mishra
 
Heuristic search
Heuristic searchHeuristic search
Heuristic searchNivethaS35
 
Syntactic analysis in NLP
Syntactic analysis in NLPSyntactic analysis in NLP
Syntactic analysis in NLPkartikaVashisht
 
A Panorama of Natural Language Processing
A Panorama of Natural Language ProcessingA Panorama of Natural Language Processing
A Panorama of Natural Language ProcessingTed Xiao
 
Lecture Notes-Are Natural Languages Regular.pdf
Lecture Notes-Are Natural Languages Regular.pdfLecture Notes-Are Natural Languages Regular.pdf
Lecture Notes-Are Natural Languages Regular.pdfDeptii Chaudhari
 
NLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishNLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishHemantha Kulathilake
 
Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Animesh Chaturvedi
 

Mais procurados (20)

Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Chapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata TheoryChapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata Theory
 
Context free grammars
Context free grammarsContext free grammars
Context free grammars
 
Lecture: Word Sense Disambiguation
Lecture: Word Sense DisambiguationLecture: Word Sense Disambiguation
Lecture: Word Sense Disambiguation
 
Context free grammar
Context free grammar Context free grammar
Context free grammar
 
Natural Language processing Parts of speech tagging, its classes, and how to ...
Natural Language processing Parts of speech tagging, its classes, and how to ...Natural Language processing Parts of speech tagging, its classes, and how to ...
Natural Language processing Parts of speech tagging, its classes, and how to ...
 
Knowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and ReasoningKnowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and Reasoning
 
Rule based system
Rule based systemRule based system
Rule based system
 
Lecture Notes-Finite State Automata for NLP.pdf
Lecture Notes-Finite State Automata for NLP.pdfLecture Notes-Finite State Automata for NLP.pdf
Lecture Notes-Finite State Automata for NLP.pdf
 
Applied Artificial Intelligence Unit 4 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 4 Semester 3 MSc IT Part 2 Mumbai Univer...Applied Artificial Intelligence Unit 4 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 4 Semester 3 MSc IT Part 2 Mumbai Univer...
 
Text similarity measures
Text similarity measuresText similarity measures
Text similarity measures
 
Applied Artificial Intelligence Unit 1 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 1 Semester 3 MSc IT Part 2 Mumbai Univer...Applied Artificial Intelligence Unit 1 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 1 Semester 3 MSc IT Part 2 Mumbai Univer...
 
Heuristic search
Heuristic searchHeuristic search
Heuristic search
 
Naive bayes
Naive bayesNaive bayes
Naive bayes
 
Syntactic analysis in NLP
Syntactic analysis in NLPSyntactic analysis in NLP
Syntactic analysis in NLP
 
A Panorama of Natural Language Processing
A Panorama of Natural Language ProcessingA Panorama of Natural Language Processing
A Panorama of Natural Language Processing
 
Lstm
LstmLstm
Lstm
 
Lecture Notes-Are Natural Languages Regular.pdf
Lecture Notes-Are Natural Languages Regular.pdfLecture Notes-Are Natural Languages Regular.pdf
Lecture Notes-Are Natural Languages Regular.pdf
 
NLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishNLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for English
 
Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)
 

Destaque

Artificial Intelligence: Use of AI and Natural Language Processing to effecti...
Artificial Intelligence: Use of AI and Natural Language Processing to effecti...Artificial Intelligence: Use of AI and Natural Language Processing to effecti...
Artificial Intelligence: Use of AI and Natural Language Processing to effecti...White Clarke Group
 
From Natural Language Processing to Artificial Intelligence
From Natural Language Processing to Artificial IntelligenceFrom Natural Language Processing to Artificial Intelligence
From Natural Language Processing to Artificial IntelligenceJonathan Mugan
 
Semi-supervised classification for natural language processing
Semi-supervised classification for natural language processingSemi-supervised classification for natural language processing
Semi-supervised classification for natural language processingRushdi Shams
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language ProcessingSaurabh Kaushik
 
Types of machine translation
Types of machine translationTypes of machine translation
Types of machine translationRushdi Shams
 
Natural language processing
Natural language processingNatural language processing
Natural language processingHansi Thenuwara
 
Natural language processing (NLP) introduction
Natural language processing (NLP) introductionNatural language processing (NLP) introduction
Natural language processing (NLP) introductionRobert Lujo
 
Introduction to Natural Language Processing
Introduction to Natural Language ProcessingIntroduction to Natural Language Processing
Introduction to Natural Language Processingrohitnayak
 
Dependency Parsing
Dependency ParsingDependency Parsing
Dependency ParsingJinho Choi
 
Text Analytics for Semantic Computing
Text Analytics for Semantic ComputingText Analytics for Semantic Computing
Text Analytics for Semantic ComputingMeena Nagarajan
 
L1 l2 l3 introduction to machine translation
L1 l2 l3  introduction to machine translationL1 l2 l3  introduction to machine translation
L1 l2 l3 introduction to machine translationRushdi Shams
 
Probabilistic logic
Probabilistic logicProbabilistic logic
Probabilistic logicRushdi Shams
 
Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing Mustafa Jarrar
 
Jarrar: Description Logic
Jarrar: Description LogicJarrar: Description Logic
Jarrar: Description LogicMustafa Jarrar
 

Destaque (20)

Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 
Artificial Intelligence: Use of AI and Natural Language Processing to effecti...
Artificial Intelligence: Use of AI and Natural Language Processing to effecti...Artificial Intelligence: Use of AI and Natural Language Processing to effecti...
Artificial Intelligence: Use of AI and Natural Language Processing to effecti...
 
From Natural Language Processing to Artificial Intelligence
From Natural Language Processing to Artificial IntelligenceFrom Natural Language Processing to Artificial Intelligence
From Natural Language Processing to Artificial Intelligence
 
L15 fuzzy logic
L15  fuzzy logicL15  fuzzy logic
L15 fuzzy logic
 
Semi-supervised classification for natural language processing
Semi-supervised classification for natural language processingSemi-supervised classification for natural language processing
Semi-supervised classification for natural language processing
 
Linguistics5
Linguistics5         Linguistics5
Linguistics5
 
Syntax analysis
Syntax analysisSyntax analysis
Syntax analysis
 
Parsing
ParsingParsing
Parsing
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 
Types of machine translation
Types of machine translationTypes of machine translation
Types of machine translation
 
Natural language processing
Natural language processingNatural language processing
Natural language processing
 
Natural language processing (NLP) introduction
Natural language processing (NLP) introductionNatural language processing (NLP) introduction
Natural language processing (NLP) introduction
 
Introduction to Natural Language Processing
Introduction to Natural Language ProcessingIntroduction to Natural Language Processing
Introduction to Natural Language Processing
 
L4 vpn
L4  vpnL4  vpn
L4 vpn
 
Dependency Parsing
Dependency ParsingDependency Parsing
Dependency Parsing
 
Text Analytics for Semantic Computing
Text Analytics for Semantic ComputingText Analytics for Semantic Computing
Text Analytics for Semantic Computing
 
L1 l2 l3 introduction to machine translation
L1 l2 l3  introduction to machine translationL1 l2 l3  introduction to machine translation
L1 l2 l3 introduction to machine translation
 
Probabilistic logic
Probabilistic logicProbabilistic logic
Probabilistic logic
 
Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing
 
Jarrar: Description Logic
Jarrar: Description LogicJarrar: Description Logic
Jarrar: Description Logic
 

Semelhante a Natural Language Processing: Parsing

Syntax and semantics
Syntax and semanticsSyntax and semantics
Syntax and semanticsRushdi Shams
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language ProcessingToine Bogers
 
Sneha Rajana - Deep Learning Architectures for Semantic Relation Detection Tasks
Sneha Rajana - Deep Learning Architectures for Semantic Relation Detection TasksSneha Rajana - Deep Learning Architectures for Semantic Relation Detection Tasks
Sneha Rajana - Deep Learning Architectures for Semantic Relation Detection TasksMLconf
 
Introduction to Natural Language Processing
Introduction to Natural Language ProcessingIntroduction to Natural Language Processing
Introduction to Natural Language ProcessingPranav Gupta
 
Sanskrit in Natural Language Processing
Sanskrit in Natural Language ProcessingSanskrit in Natural Language Processing
Sanskrit in Natural Language ProcessingHitesh Joshi
 
1. level of language study.pptx
1. level of language study.pptx1. level of language study.pptx
1. level of language study.pptxAlkadumiHamletto
 
Coaching kippsters to guided reading success
Coaching kippsters to guided reading successCoaching kippsters to guided reading success
Coaching kippsters to guided reading successbvardiman
 
Sat lessons power point dt6 10.05.2011
Sat lessons power point dt6 10.05.2011Sat lessons power point dt6 10.05.2011
Sat lessons power point dt6 10.05.2011VJN_88_
 
Patrick Hanks - Why lexicographers should take more notice of phraseology, co...
Patrick Hanks - Why lexicographers should take more notice of phraseology, co...Patrick Hanks - Why lexicographers should take more notice of phraseology, co...
Patrick Hanks - Why lexicographers should take more notice of phraseology, co...Scottish Language Dictionaries
 
Relationship of Descriptive Linguistics in the following areas [Autosaved].pptx
Relationship of Descriptive Linguistics in the following areas [Autosaved].pptxRelationship of Descriptive Linguistics in the following areas [Autosaved].pptx
Relationship of Descriptive Linguistics in the following areas [Autosaved].pptxEnKhi1
 
R hawkes cheney_school_session1_planning ks3
R hawkes cheney_school_session1_planning ks3R hawkes cheney_school_session1_planning ks3
R hawkes cheney_school_session1_planning ks3Rachel Hawkes
 
R hawkes cheney_school_session1_planning ks3
R hawkes cheney_school_session1_planning ks3R hawkes cheney_school_session1_planning ks3
R hawkes cheney_school_session1_planning ks3Rachel Hawkes
 
Hpai class 17 - language - 041420
Hpai   class 17 - language - 041420Hpai   class 17 - language - 041420
Hpai class 17 - language - 041420melendez321
 

Semelhante a Natural Language Processing: Parsing (20)

Syntax and semantics
Syntax and semanticsSyntax and semantics
Syntax and semantics
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 
Sneha Rajana - Deep Learning Architectures for Semantic Relation Detection Tasks
Sneha Rajana - Deep Learning Architectures for Semantic Relation Detection TasksSneha Rajana - Deep Learning Architectures for Semantic Relation Detection Tasks
Sneha Rajana - Deep Learning Architectures for Semantic Relation Detection Tasks
 
Introduction to Natural Language Processing
Introduction to Natural Language ProcessingIntroduction to Natural Language Processing
Introduction to Natural Language Processing
 
Sanskrit in Natural Language Processing
Sanskrit in Natural Language ProcessingSanskrit in Natural Language Processing
Sanskrit in Natural Language Processing
 
1. level of language study.pptx
1. level of language study.pptx1. level of language study.pptx
1. level of language study.pptx
 
Minimalism
MinimalismMinimalism
Minimalism
 
Coaching kippsters to guided reading success
Coaching kippsters to guided reading successCoaching kippsters to guided reading success
Coaching kippsters to guided reading success
 
Morphology
Morphology Morphology
Morphology
 
Minimalism
MinimalismMinimalism
Minimalism
 
Pragmatics
PragmaticsPragmatics
Pragmatics
 
Sat lessons power point dt6 10.05.2011
Sat lessons power point dt6 10.05.2011Sat lessons power point dt6 10.05.2011
Sat lessons power point dt6 10.05.2011
 
syntax.ppt.pdf
syntax.ppt.pdfsyntax.ppt.pdf
syntax.ppt.pdf
 
PoP wk 9
PoP wk 9PoP wk 9
PoP wk 9
 
Patrick Hanks - Why lexicographers should take more notice of phraseology, co...
Patrick Hanks - Why lexicographers should take more notice of phraseology, co...Patrick Hanks - Why lexicographers should take more notice of phraseology, co...
Patrick Hanks - Why lexicographers should take more notice of phraseology, co...
 
Relationship of Descriptive Linguistics in the following areas [Autosaved].pptx
Relationship of Descriptive Linguistics in the following areas [Autosaved].pptxRelationship of Descriptive Linguistics in the following areas [Autosaved].pptx
Relationship of Descriptive Linguistics in the following areas [Autosaved].pptx
 
R hawkes cheney_school_session1_planning ks3
R hawkes cheney_school_session1_planning ks3R hawkes cheney_school_session1_planning ks3
R hawkes cheney_school_session1_planning ks3
 
R hawkes cheney_school_session1_planning ks3
R hawkes cheney_school_session1_planning ks3R hawkes cheney_school_session1_planning ks3
R hawkes cheney_school_session1_planning ks3
 
Vocabulary i
Vocabulary iVocabulary i
Vocabulary i
 
Hpai class 17 - language - 041420
Hpai   class 17 - language - 041420Hpai   class 17 - language - 041420
Hpai class 17 - language - 041420
 

Mais de Rushdi Shams

Research Methodology and Tips on Better Research
Research Methodology and Tips on Better ResearchResearch Methodology and Tips on Better Research
Research Methodology and Tips on Better ResearchRushdi Shams
 
Common evaluation measures in NLP and IR
Common evaluation measures in NLP and IRCommon evaluation measures in NLP and IR
Common evaluation measures in NLP and IRRushdi Shams
 
Machine learning with nlp 101
Machine learning with nlp 101Machine learning with nlp 101
Machine learning with nlp 101Rushdi Shams
 
Knowledge structure
Knowledge structureKnowledge structure
Knowledge structureRushdi Shams
 
Knowledge representation
Knowledge representationKnowledge representation
Knowledge representationRushdi Shams
 
L5 understanding hacking
L5  understanding hackingL5  understanding hacking
L5 understanding hackingRushdi Shams
 
L2 Intrusion Detection System (IDS)
L2  Intrusion Detection System (IDS)L2  Intrusion Detection System (IDS)
L2 Intrusion Detection System (IDS)Rushdi Shams
 
L2 l3 l4 software process models
L2 l3 l4  software process modelsL2 l3 l4  software process models
L2 l3 l4 software process modelsRushdi Shams
 
L1 overview of software engineering
L1  overview of software engineeringL1  overview of software engineering
L1 overview of software engineeringRushdi Shams
 
L13 why software fails
L13  why software failsL13  why software fails
L13 why software failsRushdi Shams
 
Lecture 14,15 and 16 file systems
Lecture 14,15 and 16  file systemsLecture 14,15 and 16  file systems
Lecture 14,15 and 16 file systemsRushdi Shams
 
Lecture 11,12 and 13 deadlocks
Lecture 11,12 and 13  deadlocksLecture 11,12 and 13  deadlocks
Lecture 11,12 and 13 deadlocksRushdi Shams
 
Lecture 7, 8, 9 and 10 Inter Process Communication (IPC) in Operating Systems
Lecture 7, 8, 9 and 10  Inter Process Communication (IPC) in Operating SystemsLecture 7, 8, 9 and 10  Inter Process Communication (IPC) in Operating Systems
Lecture 7, 8, 9 and 10 Inter Process Communication (IPC) in Operating SystemsRushdi Shams
 
Lecture 5, 6 and 7 cpu scheduling
Lecture 5, 6 and 7  cpu schedulingLecture 5, 6 and 7  cpu scheduling
Lecture 5, 6 and 7 cpu schedulingRushdi Shams
 
Lecture 1 and 2 processes
Lecture 1 and 2  processesLecture 1 and 2  processes
Lecture 1 and 2 processesRushdi Shams
 
Lecture 3 and 4 threads
Lecture 3 and 4  threadsLecture 3 and 4  threads
Lecture 3 and 4 threadsRushdi Shams
 

Mais de Rushdi Shams (20)

Research Methodology and Tips on Better Research
Research Methodology and Tips on Better ResearchResearch Methodology and Tips on Better Research
Research Methodology and Tips on Better Research
 
Common evaluation measures in NLP and IR
Common evaluation measures in NLP and IRCommon evaluation measures in NLP and IR
Common evaluation measures in NLP and IR
 
Machine learning with nlp 101
Machine learning with nlp 101Machine learning with nlp 101
Machine learning with nlp 101
 
Knowledge structure
Knowledge structureKnowledge structure
Knowledge structure
 
Knowledge representation
Knowledge representationKnowledge representation
Knowledge representation
 
First order logic
First order logicFirst order logic
First order logic
 
Belief function
Belief functionBelief function
Belief function
 
L5 understanding hacking
L5  understanding hackingL5  understanding hacking
L5 understanding hacking
 
L3 defense
L3  defenseL3  defense
L3 defense
 
L2 Intrusion Detection System (IDS)
L2  Intrusion Detection System (IDS)L2  Intrusion Detection System (IDS)
L2 Intrusion Detection System (IDS)
 
L1 phishing
L1  phishingL1  phishing
L1 phishing
 
L2 l3 l4 software process models
L2 l3 l4  software process modelsL2 l3 l4  software process models
L2 l3 l4 software process models
 
L1 overview of software engineering
L1  overview of software engineeringL1  overview of software engineering
L1 overview of software engineering
 
L13 why software fails
L13  why software failsL13  why software fails
L13 why software fails
 
Lecture 14,15 and 16 file systems
Lecture 14,15 and 16  file systemsLecture 14,15 and 16  file systems
Lecture 14,15 and 16 file systems
 
Lecture 11,12 and 13 deadlocks
Lecture 11,12 and 13  deadlocksLecture 11,12 and 13  deadlocks
Lecture 11,12 and 13 deadlocks
 
Lecture 7, 8, 9 and 10 Inter Process Communication (IPC) in Operating Systems
Lecture 7, 8, 9 and 10  Inter Process Communication (IPC) in Operating SystemsLecture 7, 8, 9 and 10  Inter Process Communication (IPC) in Operating Systems
Lecture 7, 8, 9 and 10 Inter Process Communication (IPC) in Operating Systems
 
Lecture 5, 6 and 7 cpu scheduling
Lecture 5, 6 and 7  cpu schedulingLecture 5, 6 and 7  cpu scheduling
Lecture 5, 6 and 7 cpu scheduling
 
Lecture 1 and 2 processes
Lecture 1 and 2  processesLecture 1 and 2  processes
Lecture 1 and 2 processes
 
Lecture 3 and 4 threads
Lecture 3 and 4  threadsLecture 3 and 4  threads
Lecture 3 and 4 threads
 

Último

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 

Último (20)

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 

Natural Language Processing: Parsing

  • 1. Artificial Intelligence Natural Language Processing: Parsing Rushdi Shams Computational Linguistics Lab Western University. rshams@uwo.ca
  • 2. Natural Language • Natural Language means any language we speak • We need to process natural language (in text, speech, etc.) so that machine can exploit it. • Applications: numerous! – Watson (Jeopardy) – MS Word
  • 3. Parsing • The first task for any NLP-based system is to read (or to parse) the text • Parsing depends on three components of a language1. Lexicon 2. Categorization 3. Grammar Rules
  • 4. Lexicon stench | breeze | glitter | nothing | wumpus | pit | pits | gold | east | .. is | see | smell | shoot | feel | stinks | go | grab | carry | kill | turn | … right | left | east | south | back | smelly | … here | there | nearby | ahead | right | left | east | south | back | … me | you | I | it | S=HE | Y’ALL … John | Mary | Boston | UCB | PAJC | … the | a | an | … to | in | on | near | … and | or | but | … 0|1|2|3|4|5|6|7|8|9 Rushdi Shams, Dept of CSE, KUET, Bangladesh 4
  • 5. Categorization Noun > stench | breeze | glitter | nothing | wumpus | pit | pits | gold | east | .. Verb > is | see | smell | shoot | feel | stinks | go | grab | carry | kill | turn | … Adjective > right | left | east | south | back | smelly | … Adverb > here | there | nearby | ahead | right | left | east | south | back | … Pronoun > me | you | I | it | S=HE | Y’ALL … Name > John | Mary | Boston | UCB | PAJC | … Article > the | a | an | … Preposition > to | in | on | near | … Conjunction > and | or | but | … Digit > 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Rushdi Shams, Dept of CSE, KUET, Bangladesh 5
  • 6. Grammar Rules • “The large cat” • This phrase can be parsed by an NLP-system if it has a grammar like Noun Phrase -> Determiner + Adjective + Noun • If your system finds a phrase or sentence that has a pattern not mentioned in its set of Grammar Rules it won’t be able to parse them.
  • 7. Therefore... • Parsing is the process of using grammar rules to determine whether a sentence is legal, • and to obtain its Syntactic Tree Rushdi Shams, Dept of CSE, KUET, Bangladesh 7
  • 8. Syntactic Tree ‘The large cat eats the small rat’ http://www.digitalenema.com/2012_07_01_archive.html
  • 9. Syntactic Tree The large cat eats the Rushdi Shams, Dept of CSE, KUET, Bangladesh small rat 9
  • 10. Syntactic Tree Article adjective noun Verb Article adjective noun The large cat eats Rushdi Shams, Dept of CSE, KUET, Bangladesh the small rat 10
  • 11. Syntactic Tree Article adjective noun Verb noun phrase Article adjective noun The large cat eats Rushdi Shams, Dept of CSE, KUET, Bangladesh the small rat 11
  • 12. Syntactic Tree Noun phrase Article adjective noun Verb noun phrase Article adjective noun The large cat eats Rushdi Shams, Dept of CSE, KUET, Bangladesh the small rat 12
  • 13. Syntactic Tree Noun phrase verb phrase Article adjective noun Verb noun phrase Article adjective noun The large cat eats the Rushdi Shams, Dept of CSE, KUET, Bangladesh small rat 13
  • 14. Syntactic Tree sentence Noun phrase verb phrase Article adjective noun Verb noun phrase Article adjective noun The large cat eats Rushdi Shams, Dept of CSE, KUET, Bangladesh the small rat 14
  • 15. Label Bracketing • It is a process of representing the syntactic tree in another way. Rushdi Shams, Dept of CSE, KUET, Bangladesh 15
  • 16. Do yourself: Label Bracket the tree Rushdi Shams, Dept of CSE, KUET, Bangladesh 16
  • 17. Evaluation of Parsing • The two most frequent and basic measures to evaluate parsing: 17
  • 18. Precision, Recall, and F1-Score • The notions are much clearer with a contingency table- 18
  • 19.
  • 20.
  • 24. Ambiguity • There are 2 types of ambiguity1. Lexical Ambiguity: Sentence contains an idiom/word/term that has more than one meaning. Glasses means both drinking glasses and spectacles Rushdi Shams, Dept of CSE, KUET, Bangladesh 24
  • 25. Ambiguity 2. Structural Ambiguity: Sentence has more than one syntactic tree I saw the boy with the telescope Did you see the boy with a telescope? Or Did you see the boy who was having a telescope? Rushdi Shams, Dept of CSE, KUET, Bangladesh 25
  • 26. Structural Ambiguity Rushdi Shams, Dept of CSE, KUET, Bangladesh 26
  • 27. Ambiguity • Which of the following examples have lexical ambiguity and which of them carry structural ambiguity; justify1. The painter put on another coat 2. We like flying planes 3. Visiting relatives can be tiresome Rushdi Shams, Dept of CSE, KUET, Bangladesh 27
  • 28. Ambiguity • He wrote the note yesterday • You mean you carried the information by a bus? • Connecting wires are tiring in electronics lab • Squad helps dog bite victim Rushdi Shams, Dept of CSE, KUET, Bangladesh 28
  • 29. Word Sense • Most of the lexical ambiguity arises from the differences in word sense. • Word senses vary due to several factors: – Synonymy – Antonymy – Homonymy – Polysemy and – Heteronymy
  • 30. Synonymy • Synonyms are different words (or sometimes phrases) with identical or very similar meanings. • Words that are synonyms are said to be synonymous, and the state of being a synonym is called synonymy Rushdi Shams, Dept of CSE, KUET, Bangladesh 30
  • 31. Synonymy • • • • • student and pupil (noun) buy and purchase (verb) sick and ill (adjective) quickly and speedily (adverb) on and upon (preposition) Rushdi Shams, Dept of CSE, KUET, Bangladesh 31
  • 32. Synonymy is a relation between senses rather than words • Note that synonyms are defined with respect to certain senses of words • pupil as the "aperture in the iris of the eye" is not synonymous with student. • Similarly, he expired means the same as he died, yet my passport has expired cannot be replaced by my passport has died. Rushdi Shams, Dept of CSE, KUET, Bangladesh 32
  • 33. Synonymy is a relation between senses rather than words • Consider the words big and large • Are they synonyms?: – How big is the plane? – Are we travelling with a large or small plane? • How about?: – Mrs Benjamin became a big sister of him – Mrs Benjamin became a large sister of him
  • 34. Heteronymy • heteronyms (also known as heterophones) are words with – identical spellings (or characters) – but different pronunciations and meanings. Rushdi Shams, Dept of CSE, KUET, Bangladesh 34
  • 35. Antonymy • Antonyms are words with opposite or nearly opposite meanings. • short and tall • dead and alive • increase and decrease Rushdi Shams, Dept of CSE, KUET, Bangladesh 35
  • 36. Homonymy • A homonym is one of a group of words that – share the same spelling but – Have different distinct meaning • Bank (Financial Institute) vs Bank (Sloping Land) • Bat (A club for hitting the ball) vs Bat (Mammal) • Homographs (Bank/Bank, Bat/Bat) • Homophones (Right/Write, Piece/Peace) Rushdi Shams, Dept of CSE, KUET, Bangladesh 36
  • 37. Polysemy • Homonymous words that are related with each other – The bank was constructed in 1971 (building related to a financial institute) – I draw money from the bank (financial institute)
  • 38. Hypernymy and Hyponymy • Superclass-subclass structure – Car is a hypernym of Honda – Honda is a hyponym of Car
  • 39. Zeugma Test • A test to see whether or not two words have the same sense – Which flight does serve breakfast? – Does Lufthansa serve Philadelphia? • Simply make a conjunction: – Does Lufthansa serve breakfast and Philadelphia?
  • 40. WordNet 3.0 • A hierarchically organized lexical database • On-line thesaurus + aspects of a dictionary • Some other languages available or under development – (Arabic, Finnish, German, Portuguese…) Category Unique Strings Noun 117,798 Verb 11,529 Adjective 22,479 Adverb 4,481
  • 41. Senses of “bass” in Wordnet
  • 42. WordNet Hypernym Hierarchy for “bass”
  • 44. WordNet 3.0 • Where it is: – http://wordnetweb.princeton.edu/perl/webwn • Libraries – Python: WordNet from NLTK • http://www.nltk.org/Home – Java: • JWNL, extJWNL on sourceforge
  • 45. Difficulties with Natural Language: Anaphora • Using pronouns to refer back to entities already introduced in the text – After Mary proposed to John, they found a preacher and got married. For the honeymoon, they went to Hawaii – Mary saw a ring through the window and asked John for it – Mary threw a rock at the window and broke it Rushdi Shams, Dept of CSE, KUET, Bangladesh 45
  • 46. Difficulties with Natural Language: Indexicality • Indexical sentences refer to utterance situation (place, time, etc.) – I am over here – Why did you do that? Rushdi Shams, Dept of CSE, KUET, Bangladesh 46
  • 47. Difficulties with Natural Language: Metonymy • Using one noun phrase to stand for another – I've read Shakespeare – Chrysler announced record profits – The ham sandwich on Table 4 wants another beer Rushdi Shams, Dept of CSE, KUET, Bangladesh 47
  • 48. Difficulties with Natural Language: Metaphor • “Non-literal" usage of words and phrases, often systematic. – I've tried killing the process but it won't die. Its parent keeps it alive. Rushdi Shams, Dept of CSE, KUET, Bangladesh 48
  • 49. Summary • The components of a language – Lexicon – Categorization – Grammar rules • • • • • Syntactic Tree Label Bracketing Evaluation of Parsing Word sense Problem of Parsing