Natural Language Processing
Natural Language Processing
• Understanding nature language is a ‘mundane’ task.
• Mundane tasks – Humans can do easily but very difficult to
automate by computers.
• Natural Language Processing (NLP):
1. Natural Language Understanding
2. Natural Language Generation
Natural Language Processing
Natural Language Systems
• To explore general theories of human language processing.
• To do practical tasks such as providing natural language interfaces or front ends to application systems.
User System
Understanding spoken language is much harder as the
input is just the raw speech signals taken from a
microphone.
Natural Language Systems
4 stages in natural language processing - speech recognition, syntactic analysis, semantic analysis and pragmatics.
Syntactic Analysis
• To understand how words are grouped together to make complex sentences.
• A starting point for working out the meaning of the whole sentence.
• Consider the following two sentences:
1. "The dog ate the bone."
2. "The bone was eaten by the dog."
• Understanding the structure (via the syntax rules) of the sentences help us work out that it’s the bone that gets eaten and not the dog.
• Simple rule such as ‘it’s the 2nd noun that gets eaten’ wouldn’t work.
• Syntactic analysis determines possible groupings of words in a sentence.
• In other cases there may be many possible groupings of words.
• Consider the sentence "John saw Mary with a telescope."
• Two different readings based on the groupings:
1. John saw (Mary with a telescope).
2. John (saw Mary with a telescope).
• A sentence is syntactically ambiguous if there are two or more possible groupings.
• The use of general knowledge can sometimes help working out which is the intended grouping.
• For example, consider the sentence
"I saw the bridge flying into Auckland"
• This sentence is unambiguous if we bring to bear general knowledge about bridge.
• Syntactic analysis helps determining the meaning of a sentence by working out possible word structures.
• Rules of syntax are specified by writing a grammar for the language.
• A parser
1. will check if a sentence is correct according to the grammar.
2. returns a representation of the sentence’s structure.
• A simple grammar that deals with this is given below:
sentence --> noun_phase, verb phrase.
noun_phrase --> proper_noun.
noun_phrase --> determiner, noun.
verb_phrase --> verb, noun_phrase.
proper_noun --> [mary].
proper_noun --> [john].
noun --> [zebra].
noun --> [biscuit].
verb --> [ate].
verb --> [kissed].
determiner --> [the]
• The grammar given above is very limited.
• It either
1. fails to handle complex sentences; or
2. recognize some sentences that are ungrammatical such as
Semantic Analysis
• The stages of semantic and pragmatic analysis are concerned with getting the meaning of a sentence.
• Semantics – a partial representation of the meaning is obtained based on the possible syntactic structure(s) of the sentence, and on the meanings of the words.
• Pragmatics – the meaning is elaborated based on contextual and world knowledge.
•Compositional Semantics - the meaning of the whole sentence can be put together from the meaning of the parts of the sentence.
• The division of the sentence into meaningful parts was done by syntactic analysis.
• In general the meaning of a sentence may be represented using any of the knowledge representation schemes.
• Using predicate logic, for example, one can represent sentences like
"John likes Mary" likes(john,mary)
"The man likes Mary" man(m1)?likes(m1,mary)
"A man likes Mary" ?X(man(X)?likes(X,mary))
"A tall bearded man likes Mary"
?X(man(X)?tall(X)?bearded(X)?likes(X,mary)
• Using semantic net, one can represent sentence "Tarzan kissed Jane" as
Pragmatics
Pragmatics – Language as Action
• Language plays role in both communication and action.
• Some examples:
1. "Where is the coffee?"
2. "Can you close the window?"
3. "Do you have the time?"
4. "When will you be home?"
5. "You’re late"
• Language is used here to achieve something.
Pragmatics – Language as Action
• Speech act – the actions that can be achieved through language.
• Example speech acts: informing, requesting & promising.
1. S wants H to inform him where the coffee is.
2. S wants H to shut the window.
3. S wants H to tell him the time.
4. S wants H to tell him when she will be home.
5. S wants H to know that she is annoyed that he is late.
Pragmatics – Handling Pronouns
• Handling pronouns such as ‘he’, ‘she’ and ‘it’ is not always straight forward.
"Peter kisses Mary. He loves her"
loves(peter, mary).
• ‘He’ refers to male entity and ‘she’ refers to female entity.
Pragmatics – Handling Pronouns
"John buys a new telescope. He sees Mary in the distance. He gets out his telescope. He looks at her through it."
• ‘her’ refers to Mary who was not mentioned at all in the previous sentence.
• John’s telescope was referred to as ‘a new telescope’,‘his telescope’ and ‘it’.
Pragmatics – Handling Pronouns
"John saw a blue Nissan Micra and a red Ford Fiesta in the garage. He decided to buy the blue car."
• ‘the blue care’ refers to the Nissan Micra.
"When is the next flight to Sydney?"
"Does it have any seat left?"
• ‘it’ refers to a particular flight to Sydney, not Sydney itself.
Pragmatics – Ambiguity in Language
• Most utterances have more than one possible interpretation.
• Ambiguity in Speech Recognition. Homophones sound
the same such as ‘bear’ and ‘bare’.
• Syntactic ambiguity. There are two problems:
1. A word may have more than one possible syntactic
category, e.g. ‘bat’ can both be a noun or a verb.
2. A sentence may have more than one structure such as
‘John saw Mary on the hill with a telescope’.
Pragmatics – Ambiguity in Language
• Semantic ambiguity. Many words (even with the same
syntactic category) may have more than one meaning.
‘Bank’, for example, can be a river bank or a financial
institution.
• Pragmatic ambiguity. It is sometimes unclear which
object a pronoun refers to (referential ambiguity). The
utternance ‘Do you know what time it is?’ may be a
criticism or a genuine question.
Vote Result










Score: 4.0, Votes: 1
- manoharv2001's blog
- Add new comment
- 53 reads

Technorati Tags:
nice information
nice elaborate information abt language processing.