AI Programming Lecture 8 Natural Language Processing Semantics - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

AI Programming Lecture 8 Natural Language Processing Semantics

Description:

The meaning of a complex expression is determined by the meanings of its components. ... Anaphora. Context persists across time ' ... – PowerPoint PPT presentation

Number of Views:90
Avg rating:3.0/5.0
Slides: 22
Provided by: richar487
Category:

less

Transcript and Presenter's Notes

Title: AI Programming Lecture 8 Natural Language Processing Semantics


1
AI ProgrammingLecture 8Natural Language
ProcessingSemantics
  • Richard Price Simon Worgan
  • School Of Computer Science University Of
    Birmingham
  • msc59rmp, msc74sxw_at_cs.bham.ac.uk

2
Last Week
  • NLP
  • Applications.
  • Problems.
  • Syntax.
  • Parsers.
  • Recognisers.

3
Introduction
  • The importance of syntax.
  • Blocksworld.
  • Syntax Semantics.
  • Simple understanding responses.
  • Pragmatics.
  • Eliza.
  • NLP Mini-Project.

4
Compositionality
  • Syntactic structure is useful.
  • Structure often indicates meaning.
  • Freges Principle
  • The meaning of a complex expression is determined
    by the meanings of its components.

5
Blocksworld Environment
  • Environment status.
  • isa block objR
  • colour red objR
  • size big objR
  • objR ison table
  • include objG
  • ? database.

6
Which
  • Built in database query tool.
  • which().
  • lvars v
  • which(v, size big ?visa block ?v) gt
  • objR
  • Which(v, is a block ?v) gt
  • objG objR

7
Blocksworld Grammar
  • Sample grammar with lexicon.
  • s wh1 vbe np
  • np det snp
  • snp n
  • snp ap n
  • ap adj
  • wh1 where
  • det the
  • n box
  • vbe is
  • ? database.

8
Top Down Parser
  • For actual code see Sheilas notes.
  • backwardsParseTree()
  • Start with high level goal structure e.g S.
  • Taking the rules in order
  • If the LHS of a rule matches our goal or
    sub-goal.
  • Then explore the RHS of this rule as a sub-goal.
  • Until either
  • We complete all our goals sub-goals.
  • We run out of rules.
  • Return structure.

9
Parsing Example
S
Where is the red block
10
Meaning
  • Search the syntax tree for words of interest.
  • Returns potential database queries.
  • meaning(n block) gt
  • isa block ? x
  • meaning( s wh1 where vbe is np det the
    snp n block ) gt
  • where isa block ? x
  • Which return information on the environment.

11
Intelligent Responses
  • The information leads to more queries.
  • Gradually being more specific.
  • isa block ? x
  • which(x, isa block ? x) gt
  • objG objR
  • Which can then be relayed to the user.
  • If ?x ison ?y isin database then
  • x is on top of ?y gt

12
Pragmatics
  • Connect language to the world.
  • Consider intention and context.
  • Conversational background
  • Implicit beliefs shared by the participants.

13
Context - Semantics
  • The unspoken sentences

14
Anaphora
  • Context persists across time
  • Ten undergraduates and four postgraduate
    linguists attended the seminar. They were
    constantly heckling them.
  • They? Them?
  • The postgraduate and undergraduate groups persist
    over time.
  • OK i've got the nail. Now, when I nod my head
    you hit it.
  • It?

15
Intention
  • Conversations convey meanings.
  • Therefore we express meanings, using words, in
    conversation.
  • Which words?
  • We reason about the the beliefs and goals of the
    listener.

16
Grounding
  • Webster's Dictionary
  • Where is the actual meaning?

17
Breaking Eliza
You HelloEliza WHY ARE YOU SO
UNFORTHCOMING? You I'm just saying helloEliza
COULD IT BE THAT YOU ARE TOO SELF-CENTRED? You
No not really, thats a little harsh you've only
just met meEliza WHY NOT REALLY THATS A LITTLE
HARSH ME HAVE ONLY JUST MET YOU
  • Eh?
  • Only the Syntax is considered

18
Possible Expansions to Eliza
  • Anaphoric references You've Me
  • Conversational background
  • The start of a conversation.
  • Levels of familiarity.
  • Intention
  • Defensive.
  • Conveying a feeling of being insulted.
  • Meaning?
  • Tricky

19
MP Why communicate?
  • Agent motivation
  • Inform, Query, Answer, Request, Promise,
    Acknowledge, Share.
  • Is this useful?
  • What about lying?

20
MP Natural Language Ideas
  • 'Classic' NLP systems.
  • Ambiguity
  • Users motivation/intention.
  • Situated NLP, Agent Systems.
  • Environment -gt Pragmatics
  • Intention
  • Converstations

21
Conclusion
  • Syntax is a precursor to Semantics.
  • Simple NL database query tool.
  • Advanced Semantics requires more
  • Pragmatics
  • Grounding
  • How do we do it?
Write a Comment
User Comments (0)
About PowerShow.com