AI Programming Lecture 7 Natural Language Processing - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

AI Programming Lecture 7 Natural Language Processing

Description:

Machine Translation. Operating Systems. Summarising documents. Others? Difficulties ... The syntax is the structure of a phrase. A grammar is the rules within ... – PowerPoint PPT presentation

Number of Views:114
Avg rating:3.0/5.0
Slides: 14
Provided by: richar487
Category:

less

Transcript and Presenter's Notes

Title: AI Programming Lecture 7 Natural Language Processing


1
AI ProgrammingLecture 7Natural Language
Processing
  • Richard Price
  • School Of Computer Science University Of
    Birmingham
  • msc59rmp_at_cs.bham.ac.uk

2
Last Week
  • Sub-goals.
  • Planning.
  • STRIPS

3
Introduction
  • Definition.
  • Applications.
  • Difficulties.
  • Syntax Grammar.
  • Lexicon.
  • Semantics.

4
Definition
  • Natural Language
  • Spoken.
  • Written.
  • Program languages?
  • Words change quickly over time.
  • Language structure slowly changes.

5
Applications
  • Databases.
  • Automated booking systems.
  • Machine Translation.
  • Operating Systems.
  • Summarising documents.
  • Others?

6
Difficulties
  • How do we
  • Specify requirements of a system.
  • Receive language input.
  • Understand language.
  • Respond intelligently.

7
Syntax
  • The syntax is the structure of a phrase.
  • A grammar is the rules within a language.
  • Example Grammar
  • S ? NP VP
  • NP ? det noun
  • VP ? verb NP

8
Lexicon
  • The lexicon is the set of rules of individual
    rules.
  • Example
  • verb ? saw
  • verb ? like
  • noun ? man
  • noun ? woman
  • det ? a
  • det ? the
  • What about email?

9
Syntax Trees
S
NP
VP
det
noun
NP
v
the
man
saw
det
noun
the
woman
10
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.

11
Left Recursive Rules
  • Complex sentences require more rules.
  • The big red computer.
  • Add to existing grammar
  • NP ? det AP noun
  • AP ? AP adj
  • AP ? adj
  • adj ? big
  • adj ? red
  • adj ? stupid
  • What happens now?

12
Bottom Up Recogniser
  • forwardsParseGoals()
  • Start with low level input(s) as goal.
  • Taking the rules in order
  • If the RHS of a rule matches our goal or
    sub-goal.
  • Then replace our goal or sub-goal with LHS of
    rule.
  • Until either
  • We finish with a single goal matching our
    structure.
  • We run out of rules.
  • Return True or False.

13
Ambiguity
  • Many words fall under several categories.
  • Email, fax, fly
  • This causes ambiguity.
  • Structures can also be ambiguous.
  • I saw her email.
  • Ambiguous structures may indicate ambiguous
    meanings.
Write a Comment
User Comments (0)
About PowerShow.com