1 Understanding Natural Language 14 14.0The Natural Language Understanding Problem 14.1Deconstructing Language: A Symbolic Analysis 14.2Syntax 14.3Syntax.

Slides:



Advertisements
Similar presentations
Prolog programming....Dr.Yasser Nada. Chapter 8 Parsing in Prolog Taif University Fall 2010 Dr. Yasser Ahmed nada prolog programming....Dr.Yasser Nada.
Advertisements

Augmented Transition Networks
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.,
DEFINITE CLAUSE GRAMMARS Ivan Bratko University of Ljubljana Faculty of Computer and Information Sc.
1 CS 385 Fall 2006 Chapter 14 Understanding Natural Language Problems.
Grammars.
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
NLP and Speech 2004 Feature Structures Feature Structures and Unification.
1 Pertemuan 22 Natural Language Processing Syntactic Processing Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/2.
CSE 3302 Programming Languages Chengkai Li, Weimin He Spring 2008 Syntax Lecture 2 - Syntax, Spring CSE3302 Programming Languages, UT-Arlington ©Chengkai.
Natural Language Processing AI - Weeks 19 Natural Language Processing PART 2 Lee McCluskey, room 2/07
1 Chapter 20 Understanding Language. 2 Chapter 20 Contents (1) l Natural Language Processing l Morphologic Analysis l BNF l Rewrite Rules l Regular Languages.
November 12, 2009Introduction to Cognitive Science Lecture 18: NLP & Expert Systems 1 Natural Language Processing For us humans, spoken language is the.
Amirkabir University of Technology Computer Engineering Faculty AILAB Parsing Ahmad Abdollahzadeh Barfouroush Aban 1381 Natural Language Processing Course,
1 Understanding Natural Language The Natural Language Understanding Problem 14.1Deconstructing Language: A Symbolic Analysis 14.2Syntax 14.3Syntax.
Slide 1 Chapter 2-b Syntax, Semantics. Slide 2 Syntax, Semantics - Definition The syntax of a programming language is the form of its expressions, statements.
CSE (c) S. Tanimoto, 2008 Natural Language Understanding 1 Natural Language Understanding Outline: Motivation Structural vs Statistical Approaches.
Natural Language Processing AI - Weeks 19 Natural Language Processing PART 2 Lee McCluskey, room 2/07
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Using Definite Knowledge: NLP and nl_interface.pl Notes for Ch.3 of Poole et.
CPSC Compiler Tutorial 3 Parser. Parsing The syntax of most programming languages can be specified by a Context-free Grammar (CGF) Parsing: Given.
The Parts of the Sentence.  Every complete sentence must have at least one subject and one verb.  Although it is not necessary to have one in a sentence,
Context-Free Grammar CSCI-GA.2590 – Lecture 3 Ralph Grishman NYU.
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.
(2.1) Grammars  Definitions  Grammars  Backus-Naur Form  Derivation – terminology – trees  Grammars and ambiguity  Simple example  Grammar hierarchies.
Grammars.
Syntax Directed Translation. Syntax directed translation Yacc can do a simple kind of syntax directed translation from an input sentence to C code We.
Computer Science 112 Fundamentals of Programming II Recursive Processing of Languages.
exquisite corpse: form and content
CCSB354 ARTIFICIAL INTELLIGENCE (AI)
ICS611 Introduction to Compilers Set 1. What is a Compiler? A compiler is software (a program) that translates a high-level programming language to machine.
ITEC 380 Organization of programming languages Lecture 2 – Grammar / Language capabilities.
Introduction Syntax: form of a sentence (is it valid) Semantics: meaning of a sentence Valid: the frog writes neatly Invalid: swims quickly mathematics.
1 CS 385 Fall 2006 Chapter 14 Understanding Natural Language (omit 14.4)
For Friday Finish chapter 23 Homework: –Chapter 22, exercise 9.
Parsing arithmetic expressions Reading material: These notes and an implementation (see course web page). The best way to prepare [to be a programmer]
Syntax and Backus Naur Form
CSCI 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Context-free.
Understanding Natural Language
10. Parsing with Context-free Grammars -Speech and Language Processing- 발표자 : 정영임 발표일 :
 A number of a noun, pronoun,, and a verb does not refer to a specific number. It means only singular or plural.  The subject-verb agreement is very.
Transition Network Grammars for Natural Language Analysis - W. A. Woods In-Su Yoon Pusan National University School of Electrical and Computer Engineering.
CSCI 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Context-free.
Parsing. Language A set of strings from an alphabet which may be empty, finite or infinite. A language is defined by a grammar and we may also say that.
For Wednesday Read chapter 23 Homework: –Chapter 22, exercises 1,4, 7, and 14.
KNOWLEDGE REPRESENTATION 6 6.0Issues in Knowledge Representation 6.1A Brief History of AI Representational Systems 6.2Conceptual Graphs: A Network Language.
Artificial Intelligence: Natural Language
The man bites the dog man bites the dog bites the dog the dog dog Parse Tree NP A N the man bites the dog V N NP S VP A 1. Sentence  noun-phrase verb-phrase.
PARSING 2 David Kauchak CS159 – Spring 2011 some slides adapted from Ray Mooney.
Syntax The Structure of a Language. Lexical Structure The structure of the tokens of a programming language The scanner takes a sequence of characters.
CSE573 Autumn /23/98 Natural Language Processing Administrative –PS3 due today –PS4 out Wednesday, due Friday 3/13 (last day of class) special.
Top-down Parsing lecture slides from C OMP 412 Rice University Houston, Texas, Fall 2001.
Parsing and Code Generation Set 24. Parser Construction Most of the work involved in constructing a parser is carried out automatically by a program,
GRAMMARS & PARSING. Parser Construction Most of the work involved in constructing a parser is carried out automatically by a program, referred to as a.
Natural Language Processing (NLP)
Language Translation Part 2: Finite State Machines.
Composing Music with Grammars. grammar the whole system and structure of a language or of languages in general, usually taken as consisting of syntax.
Natural Language Processing (NLP)
Formal grammars A formal grammar is a system for defining the syntax of a language by specifying sequences of symbols or sentences that are considered.
By Kyle McCardle.  Issues with Natural Language  Basic Components  Syntax  The Earley Parser  Transition Network Parsers  Augmented Transition Networks.
Welcome to the flashcards tool for ‘The Study of Language, 5 th edition’, Chapter 8 This is designed as a simple supplementary resource for this textbook,
1 Simple Lisp Programs References:
10/31/00 1 Introduction to Cognitive Science Linguistics Component Topic: Formal Grammars: Generating and Parsing Lecturer: Dr Bodomo.
CS 326 Programming Languages, Concepts and Implementation
Fundamentals of Programming II Recursive Processing of Languages
Natural Language Understanding
Natural Language Processing (NLP)
Natural Language Understanding
Artificial Intelligence 2004 Speech & Natural Language Processing
Presentation transcript:

1 Understanding Natural Language The Natural Language Understanding Problem 14.1Deconstructing Language: A Symbolic Analysis 14.2Syntax 14.3Syntax and Knowledge with ATN parsers 14.4Stochastic Tools for Language Analysis 14.5Natural Language Applications 14.6Epilogue and References 14.7Exercises Additional source used in preparing the slides: Patrick H. Winston’s AI textbook, Addison Wesley, 1993.

2 Alternative to CSGs Retain simple structure of CFGs Augment them with procedures that perform the necessary contextual tests Attach features to terminals and nonterminals: augmented transition networks

3 Parsing with ATNs Attach procedures to the arcs of the network. The parser will execute those procedures while traversing the arcs. The procedures:  Perform tests  Construct a parse tree Both terminals and nonterminals are represented as identifiers with attached features.

4 Frames for three nonterminals Sentence Noun phrase: Verb phrase: Verb phrase Verb: Number: Object: Noun phrase Determiner: Noun: Number:

5 Dictionary entries - 1 PART_OF_SPEECH: verb ROOT: like NUMBER: plural like PART_OF_SPEECH: verb ROOT: like NUMBER: singular PART_OF_SPEECH: verb ROOT: bite NUMBER: plural PART_OF_SPEECH: verb ROOT: bite NUMBER: singular bitebites likes

6 Dictionary entries - 2 PART_OF_SPEECH: noun ROOT: man NUMBER: plural men PART_OF_SPEECH: noun ROOT: man NUMBER: singular PART_OF_SPEECH: noun ROOT: dog NUMBER: plural PART_OF_SPEECH: noun ROOT: dog NUMBER: singular dogsdog man

7 Dictionary entries - 3 PART_OF_SPEECH: article ROOT: a NUMBER: singular a PART_OF_SPEECH: article ROOT: the NUMBER: plural or singular the

8 Sentence function sentence-1; begin NOUN_PHRASE := structure returned by noun_phrase network; SENTENCE.SUBJECT := NOUN_PHRASE; end. initfinal noun_phrase verb_phrase 12

9 Sentence function sentence-2; begin VERB_PHRASE := structure returned by verb_phrase network; if NOUN_PHRASE.NUMBER = VERB_PHRASE.number then begin SENTENCE.VERB_PHRASE := VERB_PHRASE; return SENTENCE end else fail end. initfinal noun_phrase verb_phrase 12

10 Noun_phrase function noun_phrase-1; begin ARTICLE := definition frame for next word of input; if ARTICLE.PART_OF_SPEECH = article then NOUN_PHRASE.DETERMINER := ARTICLE else fail end. initfinal article noun 12 3

11 Noun_phrase function noun_phrase-2; begin NOUN := definition frame for next word of input; if NOUN.PART_OF_SPEECH = noun and NOUN.NUMBER agrees with NOUN_PHRASE.DETERMINER.NUMBER then begin NOUN_PHRASE.NOUN := NOUN NOUN_PHRASE.NUMBER := NOUN.NUMBER return NOUN_PHRASE end else fail end. initfinal article noun 12 3

12 Noun_phrase function noun_phrase-3; begin NOUN := definition frame for next word of input; if NOUN.PART_OF_SPEECH = noun then begin NOUN_PHRASE.DETERMINER := unspecified NOUN_PHRASE.NOUN := NOUN NOUN_PHRASE.NUMBER := NOUN.NUMBER end else fail end. initfinal article noun 12 3

13 Verb_phrase function verb_phrase-1; begin VERB := definition frame for next word of input; if VERB.PART_OF_SPEECH = verb then begin VERB_PHRASE.VERB := VERB; VERB_PHRASE.NUMBER := VERB.NUMBER end; end. initfinal verb noun_phrase 12 3 verb

14 Verb_phrase function verb_phrase-2; begin NOUN_PHRASE := structure returned by noun_phrase network; VERB.PHRASE.OBJECT := NOUN_PHRASE; return VERB_PHRASE end. initfinal verb noun_phrase 12 3 verb

15 Verb_phrase function verb_phrase-3; begin VERB := definition frame for next word of input; if VERB.PART_OF_SPEECH = verb then begin VERB_PHRASE.VERB := VERB; VERB_PHRASE.NUMBER := VERB.NUMBER VERB_PHRASE.OBJECT := unspecified; return VERB_PHRASE end; end. initfinal verb noun_phrase 12 3 verb

16 “The dog likes a man.”

17 Knowledge base for the “dogs world.”

18 Case frames for two verbs

19 Semantic representation

20 Concluding remarks The parse tree can be converted to a conceptual graph that represents the meaning of the sentence. Simpler approaches use templates and plug in words as they are recognized. Applications include:  Story understanding and question answering  Front End to a database  Information extraction and summarization on the web