Natural Language Understanding

Slides:



Advertisements
Similar presentations
Computational language: week 10 Lexical Knowledge Representation concluded Syntax-based computational language Sentence structure: syntax Context free.
Advertisements

Augmented Transition Networks
C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
Grammars, constituency and order A grammar describes the legal strings of a language in terms of constituency and order. For example, a grammar for a fragment.
Grammars, Languages and Parse Trees. Language Let V be an alphabet or vocabulary V* is set of all strings over V A language L is a subset of V*, i.e.,
For Monday Read Chapter 23, sections 3-4 Homework –Chapter 23, exercises 1, 6, 14, 19 –Do them in order. Do NOT read ahead.
Understanding Natural Language
ISBN Chapter 3 Describing Syntax and Semantics.
CSE (c) S. Tanimoto, 2004 Natural Language Understanding 1 Natural Language Understanding Outline: Motivation The SHRINK program, revisited Communicating.
CS 330 Programming Languages 09 / 13 / 2007 Instructor: Michael Eckmann.
Chapter 3 Describing Syntax and Semantics Sections 1-3.
CSE (c) S. Tanimoto, 2008 Natural Language Understanding 1 Natural Language Understanding Outline: Motivation Structural vs Statistical Approaches.
Chapter 3: Formal Translation Models
Specifying Languages CS 480/680 – Comparative Languages.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Languages and Grammars MSU CSE 260. Outline Introduction: E xample Phrase-Structure Grammars: Terminology, Definition, Derivation, Language of a Grammar,
Models of Generative Grammar Smriti Singh. Generative Grammar  A Generative Grammar is a set of formal rules that can generate an infinite set of sentences.
1 CS 385 Fall 2006 Chapter 14 Understanding Natural Language (omit 14.4)
For Friday Finish chapter 23 Homework: –Chapter 22, exercise 9.
Understanding Natural Language
CS Describing Syntax CS 3360 Spring 2012 Sec Adapted from Addison Wesley’s lecture notes (Copyright © 2004 Pearson Addison Wesley)
Grammars CPSC 5135.
Introduction to CL & NLP CMSC April 1, 2003.
ProgrammingLanguages Programming Languages Language Syntax This lecture introduces the the lexical structure of programming languages; the context-free.
Transition Network Grammars for Natural Language Analysis - W. A. Woods In-Su Yoon Pusan National University School of Electrical and Computer Engineering.
Copyright © Curt Hill Languages and Grammars This is not English Class. But there is a resemblance.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Compiler Design Introduction 1. 2 Course Outline Introduction to Compiling Lexical Analysis Syntax Analysis –Context Free Grammars –Top-Down Parsing –Bottom-Up.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Syntax Analysis - Parsing Compiler Design Lecture (01/28/98) Computer Science Rensselaer Polytechnic.
NATURAL LANGUAGE PROCESSING
CSE S. Tanimoto Pattern Matching 1 Pattern Matching Many Lisp programs are “data driven”. The program exams the data and then decides how to process.
Pattern Recognition. What is Pattern Recognition? Pattern recognition is a sub-topic of machine learning. PR is the science that concerns the description.
By Kyle McCardle.  Issues with Natural Language  Basic Components  Syntax  The Earley Parser  Transition Network Parsers  Augmented Transition Networks.
10/31/00 1 Introduction to Cognitive Science Linguistics Component Topic: Formal Grammars: Generating and Parsing Lecturer: Dr Bodomo.
Last Chapter Review Source code characters combination lexemes tokens pattern Non-Formalization Description Formalization Description Regular Expression.
Describing Syntax and Semantics Chapter 3: Describing Syntax and Semantics Lectures # 6.
5. Context-Free Grammars and Languages
BCT 2083 DISCRETE STRUCTURE AND APPLICATIONS
System Software Unit-1 (Language Processors) A TOY Compiler
Chapter 11: Artificial Intelligence
Programming Languages Translator
Chapter 3 Context-Free Grammar and Parsing
Introduction to Parsing (adapted from CS 164 at Berkeley)
CSC 8310 Programming Languages
L-systems L-systems are grammatical systems introduced by Lyndenmayer to describe biological developments such as the growth of plants and cellular organisms.
Representation, Syntax, Paradigms, Types
Formal Language Theory
CS416 Compiler Design lec00-outline September 19, 2018
CSE 3302 Programming Languages
Parsing & Context-Free Grammars Hal Perkins Autumn 2011
Lexical and Syntax Analysis
Introduction CI612 Compiler Design CI612 Compiler Design.
Natural Language - General
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Representation, Syntax, Paradigms, Types
Natural Language Understanding
Representation, Syntax, Paradigms, Types
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
CS416 Compiler Design lec00-outline February 23, 2019
Teori Bahasa dan Automata Lecture 9: Contex-Free Grammars
Representation, Syntax, Paradigms, Types
Syntax vs Semantics Backus-Naur Form Extended BNF Derivations
Parsing & Context-Free Grammars Hal Perkins Summer 2004
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Formal Languages Context free languages provide a convenient notation for recursive description of languages. The original goal of formalizing the structure.
Lec00-outline May 18, 2019 Compiler Design CS416 Compiler Design.
Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Programming Logic and Design Eighth Edition
Faculty of Computer Science and Information System
Presentation transcript:

Natural Language Understanding Outline: Motivation The SHRINK program Communicating with language Syntax Semantics Semantic grammars The STONEWORLD program CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding Motivation Make it easier for people to give commands to computers. Allow computers to perform language translation. Allow computers to listen to lectures and read books, in order alleviate the knowledge acquisition bottleneck. Integrate robots into human society. CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding The SHRINK Program Holds a conversation with the user. Illustrates how shallow a program’s knowledge can be and still present an image of understanding. Demonstrates key ideas from J. Weizenbaum’s ELIZA program, published in 1966. CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding Mechanisms in SHRINK Processing is oriented towards maintaining an illusion of understanding. Pattern matching used to “parse” user input. The YOU-ME-MAP function transposes first and second person references. Keyword-based rules respond to certain topics such as dreams, love, being positive or negative. Questions to the SHRINK are transformed into questions to the user. When all other rules fail, PUNT responses are used. CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

A Sample Dialog with SHRINK WELCOME TO MY SOFA! PLEASE ENCLOSE YOUR INPUT IN PARENTHESES. (hi there) TELL ME MORE (i have a little problem) HOW LONG HAVE YOU HAD A LITTLE PROBLEM? (ever since i told my girlfriend that i love computers more than her) ALL IS FAIR IN LOVE AND WAR (thanks maybe i should have told her that) BE MORE DECISIVE (ok) I SEE (bye) GOODBYE CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

Communicating with Language Language is for communication. Communication usually means sending and receiving information. Sentences describe events, states of the world, objects and ideas, feelings and attitudes, and hypothetical situtations. Phrase-structure grammars provide a method of structuring messages, allowing for a great variety of possible meanings. CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding Syntax Describes the form, not meaning, of sentences in a language. Syntax is traditionally described with formal systems called grammars. A context free grammar can be specified with 4 components: G = (Σ, V, S, P), where Σ is a finite set of terminal symbols called the alphabet. V is a finite set of nonterminal symbols. S is a distinguished member of V called the start symbol. P is a finite set of productions. CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding Example Grammar G = ({0, 1}, {S, A, B}, S, P), where P = { S -> 01S S -> 10S S -> 0S1 S -> 1S0 S -> 01 S -> 10 } CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding Example Grammar 2 G = ({symbols, are, tools}, {S, N, V}, S, P), where P = { S -> NVN N -> symbols N -> tools V -> are } A derivation of a sentence from S: S -> NVN -> tools VN -> tools are N -> tools are symbols Each item in the sequence is a sentential form. CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding Exercise For each of the strings below, determine whether or not it is in L(G), the language generated by G. If it’s in the language, give a derivation. 01 λ 011001 01S10 101S101 G = ({0, 1}, {S, A, B}, S, P), where P = {S -> 01S, S -> 10S, S -> 0S1, S -> 1S0, S -> 01, S -> 10} CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding Semantics Representation of meaning using case frames. The verb structures the frame: “Alexander took an exam.” Agent: Alexander Action: take (write, submit to) Object: exam Time: past CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding Semantic Grammar A semantic grammar is a grammar whose syntactic categories correspond directly to groups of words whose meanings can be largely inferred from the parse. <command> -> <do-word> the <job-word> <do-word> -> do | perform | start | finish <job-word> -> job | task | command | activity | operation “start the activity” “do the operation” “finish the job” CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

Augmented Transition Nets An ATN is a language processor that combines parsing and translation. It is based on a collection of transition diagrams. <command> the <do-word> <job-word> <do-word> do, etc. <job-word> job, etc CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding Stone World A microworld: 2-D cellular space in which various objects can be placed. An agent “Mace” that takes commands from the user, and which inhabits the microworld. Stationary objects: pillars, wells, quarries. Portable objects: stones, gems. Actions: Mace can move and can carry objects. A natural-language interface: Augmented transition network based on a semantic grammar. CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

Stone World Motivation Demonstrates a full combination of syntax, semantics, actions, and responses. An artificial, closed world permits unambiguous interpretation. Stone World offers a substrate upon which experiments can games can be constructed. Stone World, while simple by comparison, shares these features with the well-known research system SHRDLU, developed by Terry Winograd at MIT. CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding Stone World’s ATN * TO (DNP1) TOWARD (DNP1) G2 G3 * SHOW * (GO-VERB) G1 T2 T3 T4 LAST (TAKE-VERB) UP, (NP1) * G1 DOWN,  DOWN,  (PUT-VERB) P2 P3 IT CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

Stone World’s ATN (Cont) NP1 NP2 (ARTICLE) (OBJ-NOUN) (OBJ-NOUN) DNP1 DNP2 (ARTICLE) (DIRECTION-NOUN) CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding

CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding Sample Conversation WALK NORTH * I UNDERSTAND YOU. OK GO TO THE WEST * GO WEST * TAKE A STONE FROM THE QUARRY * DROP THE STONE TOWARD THE EAST * TAKE A STONE * DROP IT TO THE NORTH * GO SOUTH * CSE 415 -- (c) S. Tanimoto, 2001 Natural Language Understanding