Parsing: Features & ATN & Prolog By

Slides:



Advertisements
Similar presentations
 Christel Kemke 2007/08 COMP 4060 Natural Language Processing Feature Structures and Unification.
Advertisements

Feature Structures and Parsing Unification Grammars Algorithms for NLP 18 November 2014.
Augmented Transition Networks
Natural Language Processing Lecture 2: Semantics.
CSA2050: DCG I1 CSA2050 Introduction to Computational Linguistics Lecture 8 Definite Clause Grammars.
1 Unification Grammars Allen ’ s Chapter 4 J&M ’ s Chapter 11.
BİL711 Natural Language Processing1 Problems with CFGs We know that CFGs cannot handle certain things which are available in natural languages. In particular,
1 Natural Language Processing Lecture 7 Unification Grammars Reading: James Allen NLU (Chapter 4)
FSG, RegEx, and CFG Chapter 2 Of Sag’s Syntactic Theory.
1 Chapter Chapter 5 Grammars for Natural Language 5.1 Auxiliary Verbs and Verb Phrases 5.2 Movement Phenomena in Language 5.3 Handling Questions in Context-Free.
Natural Language Understanding Understanding NL (infinite language) means determining the meaning of the sentence with respect to contest in which it is.
Statistical NLP: Lecture 3
DEFINITE CLAUSE GRAMMARS Ivan Bratko University of Ljubljana Faculty of Computer and Information Sc.
GRAMMAR & PARSING (Syntactic Analysis) NLP- WEEK 4.
1 Features and Augmented Grammars Allen ’ s Chapter 4 J&M ’ s Chapter 11.
Natural Language Processing - Feature Structures - Feature Structures and Unification.
1 Words and the Lexicon September 10th 2009 Lecture #3.
Amirkabir University of Technology Computer Engineering Faculty AILAB Efficient Parsing Ahmad Abdollahzadeh Barfouroush Aban 1381 Natural Language Processing.
LING 364: Introduction to Formal Semantics Lecture 4 January 24th.
Amirkabir University of Technology Computer Engineering Faculty AILAB Parsing Ahmad Abdollahzadeh Barfouroush Aban 1381 Natural Language Processing Course,
 Christel Kemke 2007/08 COMP 4060 Natural Language Processing Feature Structures and Unification.
Features and Unification
Fall 2004 Lecture Notes #5 EECS 595 / LING 541 / SI 661 Natural Language Processing.
1 CSC 594 Topics in AI – Applied Natural Language Processing Fall 2009/ Outline of English Syntax.
Natural Language Processing
CS 4705 Lecture 11 Feature Structures and Unification Parsing.
Stochastic POS tagging Stochastic taggers choose tags that result in the highest probability: P(word | tag) * P(tag | previous n tags) Stochastic taggers.
LING 364: Introduction to Formal Semantics Lecture 5 January 26th.
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 A Chart Parser for Analyzing Modern Standard Arabic Sentence Eman Othman Computer Science Dept., Institute of Statistical Studies and Research (ISSR),
11 CS 388: Natural Language Processing: Syntactic Parsing Raymond J. Mooney University of Texas at Austin.
1 Semantics Interpretation Allen ’ s Chapter 9 J&M ’ s Chapter 15.
1 Features and Unification Chapter 15 October 2012 Lecture #10.
Computing Science, University of Aberdeen1 CS4025: Grammars l Grammars for English l Features l Definite Clause Grammars See J&M Chapter 9 in 1 st ed,
LING 388: Language and Computers Sandiway Fong Lecture 17.
October 2008csa3180: Setence Parsing Algorithms 1 1 CSA350: NLP Algorithms Sentence Parsing I The Parsing Problem Parsing as Search Top Down/Bottom Up.
For Friday Finish chapter 23 Homework: –Chapter 22, exercise 9.
CS : Language Technology for the Web/Natural Language Processing Pushpak Bhattacharyya CSE Dept., IIT Bombay Constituent Parsing and Algorithms (with.
LING 388: Language and Computers Sandiway Fong Lecture 18.
Context-Free Parsing Read J & M Chapter 10.. Basic Parsing Facts Regular LanguagesContext-Free Languages Required Automaton FSMPDA Algorithm to get rid.
1 Natural Language Processing Lecture Notes 11 Chapter 15 (part 1)
PHRASE STRUCTURE GRAMMARS RTNs ATNs Augmented phrase structure rules / trees.
Transition Network Grammars for Natural Language Analysis - W. A. Woods In-Su Yoon Pusan National University School of Electrical and Computer Engineering.
2007CLINT-LIN-FEATSTR1 Computational Linguistics for Linguists Feature Structures.
November 2011Sentence Grammar1 CSA3202: HLT Sentence Grammar.
For Wednesday Read chapter 23 Homework: –Chapter 22, exercises 1,4, 7, and 14.
Linguistic Essentials
Rules, Movement, Ambiguity
Artificial Intelligence 2004
Computing Science, University of Aberdeen1 CS4025: Grammars l Grammars for English l Features l Definite Clause Grammars See J&M Chapter 9 in 1 st ed,
1 Recursive Transition Networks Allen ’ s Chapters 3 J&M ’ s Chapter 10.
CPSC 422, Lecture 27Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 27 Nov, 16, 2015.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 2.
1 Natural Language Processing Lecture 6 Features and Augmented Grammars Reading: James Allen NLU (Chapter 4)
◦ Process of describing the structure of phrases and sentences Chapter 8 - Phrases and sentences: grammar1.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Fall 2005-Lecture 3.
October 2004CSA3050 NLP Algorithms1 CSA3050: Natural Language Algorithms Morphological Parsing.
CSA3050: NLP Algorithms Sentence Grammar NLP Algorithms.
April 2010Semantic Grammar1 A short guide to Blackburn’s Grammar of English.
3.3 A More Detailed Look At Transformations Inversion (revised): Move Infl to C. Do Insertion: Insert interrogative do into an empty.
Chapter 11: Parsing with Unification Grammars Heshaam Faili University of Tehran.
Parallel Tools for Natural Language Processing Mark Brigham Melanie Goetz Andrew Hogue / March 16, 2004.
Grammar and Sentence Writing ENG 111 Al-Huqail, Eman.
Syntax and Processing it: Definite Clause Grammars in Prolog (optional material) John Barnden School of Computer Science University of Birmingham Natural.
Lecture – VIII Monojit Choudhury RS, CSE, IIT Kharagpur
Basic Parsing with Context Free Grammars Chapter 13
Natural Language Processing
CS : Speech, NLP and the Web/Topics in AI
LING/C SC/PSYC 438/538 Lecture 21 Sandiway Fong.
PRESENTATION: GROUP # 5 Roll No: 14,17,25,36,37 TOPIC: STATISTICAL PARSING AND HIDDEN MARKOV MODEL.
Presentation transcript:

Parsing: Features & ATN & Prolog By

Feature System CFG – inconvenient for capturing NL. CFG – inconvenient for capturing NL. Most NL are often agreement restrictions between words and phrases. Most NL are often agreement restrictions between words and phrases. For example: For example: –*a men (a man) : a indicates single object while the noun men indicates a plural object –The noun phrase does not satisfy the Number Agreement restriction of English Other forms of agreements: Other forms of agreements: –Subject-verb –Gender agreement for pronouns –Restriction between the head of a phrase & the form of its complement

Feature System cont. To handle such phenomena: To handle such phenomena: –Grammatical formalism is extended to allow constituent to have Features –Eg: define a feature NUMBER that may take a value of either s (singular) or p (plural).

Augmented Transition Network (ATN) RTN –> add features = ATN RTN –> add features = ATN The features are called Registers The features are called Registers Constituent structures are created by allowing each network to have a set of registers. Constituent structures are created by allowing each network to have a set of registers.

ATN processes When a network is pushed, a new set of registers is created When a network is pushed, a new set of registers is created As the network is traversed, the registers are set to values by actions associated with each arc. As the network is traversed, the registers are set to values by actions associated with each arc. When the network is popped, the register are assembled to form a constituent structure, with the CAT slot being the network name When the network is popped, the register are assembled to form a constituent structure, with the CAT slot being the network name

Example ATN Grammar Example Grammar 4.11 (pg 102, Allen) & 4.12 Example Grammar 4.11 (pg 102, Allen) & 4.12

Grammar & Logic Programming Another popular method is to encode the rules of grammar into logic programming language such as Prolog. Another popular method is to encode the rules of grammar into logic programming language such as Prolog. Prolog uses the same search strategy: depth first top-down parsing algorithm Prolog uses the same search strategy: depth first top-down parsing algorithm Just need to reformulate CFG as clauses in PROLOG Just need to reformulate CFG as clauses in PROLOG

Example S -> NP VP S -> NP VP S(P1,P3):- np(P1,P2), vp(P2,P3). S(P1,P3):- np(P1,P2), vp(P2,P3). –Axiom: “There is an S between position 1 and position 3, if there is a position p2 such that there is an NP between p1 and p2 and a VP between p2 and p3”. Add axioms listing the words in the sentence (‘John ate the cat’) by their position: Add axioms listing the words in the sentence (‘John ate the cat’) by their position: –word(john,1,2). –word(ate,2,3). –word(the,3,4). –word(cat,4,5).

Example cont. The Lexicon is defined by a set of predicates: The Lexicon is defined by a set of predicates: –isart(the). –isname(john). –isverb(ate). –isnoun(cat). Ambiguous words would produce multiple assertions – one for each syntactic category to which they belong

Example cont. For each syntactic category, define a predicate that is true only if the word between the two specified positions is of that category, for example: For each syntactic category, define a predicate that is true only if the word between the two specified positions is of that category, for example: –n(I,O):- word(Word,I,O), isnoun(Word). –art(I,O):- word(Word,I,O), isart(Word). –v(I,O):- word(Word,I,O), isverb(Word). –name(I,O):- word(Word,I,O), isname(Word).

Prolog-based Parsing Prove that “John ate the cat” is a legal sentence. Prove that “John ate the cat” is a legal sentence. ie. Prove : S(1,5). ie. Prove : S(1,5). Refer the tracing example in page 74, Allen Refer the tracing example in page 74, Allen