2007CLINT-LIN-FEATSTR1 Computational Linguistics for Linguists Feature Structures.

Slides:



Advertisements
Similar presentations
Feature-based Grammar Ling 571 Deep Techniques for NLP February 2, 2001.
Advertisements

 Christel Kemke 2007/08 COMP 4060 Natural Language Processing Feature Structures and Unification.
Feature Structures and Parsing Unification Grammars Algorithms for NLP 18 November 2014.
Notes on TAG (LTAG) and Feature Structures September AKJ.
CSA2050: DCG I1 CSA2050 Introduction to Computational Linguistics Lecture 8 Definite Clause Grammars.
Lexical Functional Grammar : Grammar Formalisms Spring Term 2004.
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)
Chapter 4 Syntax.
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.
Projecting Grammatical Features in Nominals: 23 March 2010 Jerry T. Ball Senior Research Psychologist 711 th HPW / RHAC Air Force Research Laboratory DISTRIBUTION.
Grammatical Relations and Lexical Functional Grammar Grammar Formalisms Spring Term 2004.
Math 191: Mathematics and Geometry for Designers Lecture Notes Based on The Book Mathematics in Our World by Allan G. Bluman.
Natural Language Processing - Feature Structures - Feature Structures and Unification.
NLP and Speech 2004 Feature Structures Feature Structures and Unification.
Features & Unification Ling 571 Deep Processing Techniques for NLP January 26, 2011.
Features & Unification Ling 571 Deep Processing Techniques for NLP January 31, 2011.
1 Pertemuan 22 Natural Language Processing Syntactic Processing Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/2.
Parsing: Features & ATN & Prolog By
Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.
Analyzing Features of Grammatical Categories Show my head to the people; it is worth seeing. --Feature structure, to Ivan Sag in a dream.
Artificial Intelligence 2005/06 From Syntax to Semantics.
Issues in Computational Linguistics: Parsing and Generation Dick Crouch and Tracy King.
Adding Pronoun Constraints to a Grammar: Verbs and Pronouns Present tense verbs occur in two forms: –singular: ‘eats’ –plural: ‘eat’ –only exception is.
 Christel Kemke 2007/08 COMP 4060 Natural Language Processing Feature Structures and Unification.
Features and Unification
 2003 CSLI Publications Ling 566 Oct 16, 2007 How the Grammar Works.
Ch.11 Features and Unification Ling 538, 2006 Fall Jiyoung Kim.
Unification-based algorithms We have seen that treating features, such as person-number agreement, as part of the category of a phrase results in a large.
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.
Features and Unification Read J & M Chapter 11.. Solving the Agreement Problem Number agreement: S  NP VP * Mary walk. [NP NUMBER] [VP NUMBER] NP  det.
Notes on TAG (LTAG) and Feature Structures Aravind K. Joshi April
Context-Free Parsing Part 2 Features and Unification.
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.
Grammar Nuha Alwadaani.
October 2004csa4050: Semantics II1 CSA4050: Advanced Topics in NLP Semantics II The Lambda Calculus Semantic Representation Encoding in Prolog.
Feature structures and unification Attributes and values.
1 Features and Unification Chapter 15 October 2012 Lecture #10.
LING 388: Language and Computers Sandiway Fong Lecture 17.
Lecture 1, 7/21/2005Natural Language Processing1 CS60057 Speech &Natural Language Processing Autumn 2007 Lecture4 1 August 2007.
1.Syntax: the rules of sentence formation; the component of the mental grammar that represent speakers’ knowledge of the structure of phrase and sentence.
Chapter 16: Features and Unification Heshaam Faili University of Tehran.
What it’s ? “parsing” Parsing or syntactic analysis is the process of analysing a string of symbols, either in natural language or in computer languages,
Writing an ERG mal-rule David Mott IBM Emerging Technology Services.
 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.
May 2006CLINT-LN Parsing1 Computational Linguistics Introduction Parsing with Context Free Grammars.
7. Parsing in functional unification grammar Han gi-deuc.
Rule Learning - Overview Goal: Syntactic Transfer Rules 1) Flat Seed Generation: produce rules from word- aligned sentence pairs, abstracted only to POS.
Head-driven Phrase Structure Grammar (HPSG)
November 2011CLINT-LN CFG1 Computational Linguistics Introduction Context Free Grammars.
Section 11.3 Features structures in the Grammar ─ Jin Wang.
 2003 CSLI Publications Ling 566 Oct 17, 2011 How the Grammar Works.
Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 1 LTI Grammars and Lexicons Grammar Writing Lecture.
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.
Grammar and Sentence Writing ENG 111 Al-Huqail, Eman.
10/31/00 1 Introduction to Cognitive Science Linguistics Component Topic: Formal Grammars: Generating and Parsing Lecturer: Dr Bodomo.
Natural Language Processing Vasile Rus
CSC 594 Topics in AI – Natural Language Processing
Lexical Functional Grammar
Natural Language Processing
Dependency Parsing & Feature-based Parsing
Instructor: Nick Cercone CSEB -
Introduction to Computational Linguistics
Linguistic Essentials
CPSC 503 Computational Linguistics
Ling 566 Oct 14, 2008 How the Grammar Works.
Presentation transcript:

2007CLINT-LIN-FEATSTR1 Computational Linguistics for Linguists Feature Structures

2007CLINT-LIN-FEATSTR2 Example PATR-II Grammar and Lexicon Grammar (grammar.grm) Rule s -> np vp Rule np -> n Rule vp -> v Lexicon (lexicon.lex) \w uther \c n \w sleeps \c v

2007CLINT-LIN-FEATSTR3 Example PATR-II Grammar and Lexicon Grammar (grammar.grm) Rule s -> np vp Rule np -> n Rule vp -> v Lexicon (lexicon.lex) \w uther \c n \w sleeps \c v \w sleep \c v

2007CLINT-LIN-FEATSTR4 Example PATR-II Grammar and Lexicon %Grammar(grammar.grm) Rule s -> npsg vpsg Rule s -> nppl vppl Rule npsg -> nsg Rule nppl -> npl Rule vpsg -> vsg Rule vppl -> vpl %Lexicon (lexicon.lex) \w cows \c npl \w uther \c nsg \w sleeps \c vsg \w sleep \c vpl

2007CLINT-LIN-FEATSTR5 Grammar and Lexicon with Pronouns %Grammar(grammar.grm) Rule s -> npsg vpsg Rule s -> nppl vppl Rule npsg -> nsg Rule nppl -> npl Rule vpsg -> vsg Rule vppl -> vpl %Lexicon (lexicon.lex) \w he \c nsg \w him \c nsg \w she \c nsg \w her \c nsg \w they \c npl \w them \c npl \w sleeps \c vsg \w sleep \c vpl

2007CLINT-LIN-FEATSTR6 Problem with the Grammar The grammar allows: he/him/she/her sleeps they/them sleep

2007CLINT-LIN-FEATSTR7 Grammar and Lexicon with Pronouns %Grammar(grammar.grm) Rule s -> npsgnom vpsg Rule s -> npplnom vppl Rule npsgnom -> nsgnom Rule npplnom -> nplnom Rule npsgacc -> nsgacc Rule npplacc -> nplacc Rule vpsg -> vsg Rule vppl -> vpl %Lexicon (lexicon.lex) \w he \c nsgnom \w him \c nsgacc \w she \c nsgnom \w her \c nsgacc \w they \c nplnom \w them \c nplacc \w sleeps \c vsg \w sleep \c vpl

2007CLINT-LIN-FEATSTR8 Remarks The only mechanism available to CFG to prevent overgeneration is the creation of new categories. Whenever we add new categories the grammar gets longer and less understandable Is there another way?

2007CLINT-LIN-FEATSTR9 Constraints and Information Structures PATR2 handles this problem by associating words with feature structures. Feature structures are commonly written as attribute-value matrices e.g. [cat noun num sing ] Items on the left are attributes Items on the right are corresponding values

2007CLINT-LIN-FEATSTR10 Constraints and Information Structures Rules are then augmented with constraint equations between feature structures associated with constituents. These can be used to express constraints between constituents (eg subject/verb agreement), or to pass information from words up to higher constituents (e.g. np inherits information from n).

2007CLINT-LIN-FEATSTR11 Example of a PATR rules with Constraints Rule s -> np vp = Rule np -> n =

2007CLINT-LIN-FEATSTR12 Feature Constraints Feature constraints comprise three parts, in this order: 1.a feature path, the first element of which is one of the symbols from the phrase structure rule 2.an equal sign (=) 3.either a simple value, or another feature path that also starts with a symbol from the phrase structure rule

2007CLINT-LIN-FEATSTR13 Unification Unification is the basic operation applied to feature structures in PC-PATR It consists of the merging of the information from two feature structures. Two feature structures can unify if their common features have the same values, but do not unify if any feature values conflict.

2007CLINT-LIN-FEATSTR14 Examples [num sg] unified with [person first] gives [num sg person first] [num sg] unified with [num sg] gives [num sg] [num sg] unified with [num pl] gives …

2007CLINT-LIN-FEATSTR15 Examples [num sg] unified with [person first] gives [num sg person first] [num sg] unified with [num sg] gives [num sg] [num sg] unified with [num pl] gives NOTHING

2007CLINT-LIN-FEATSTR16 Complex-Valued FS Feature structures can have either simple values, or complex values, such as this [cat np head [agr [ num sg gen masc] deftype indef]] Feature structures can be arbitrarily nested and used to build linguistic representations.

2007CLINT-LIN-FEATSTR17 Building Up Structures Agreement Features – 3 rd person singular [ num sing person 3 ] Noun Phrase – 3 rd person sing noun phrase [ cat np agr [ num sing person 3 ]] Sentence – with 3 rd person singular subject [cat s subj [ cat np agr [ num sing person 3 ]]]

2007CLINT-LIN-FEATSTR18 Simple Unification Examples 1. [ agreement: [ number: singular person: first ] ] 2. [ agreement: [ number: singular case: nominative ] ] 3. [ agreement: [ number: singular person: third ] ] 4.[ agreement: [ number: singular person: first ] case: nominative ] ] 5. [ agreement: [ number: singular person: third ] case: nominative ] ]

2007CLINT-LIN-FEATSTR19 Checkpoint Satisfy yourself that, using the previous examples: unify(1,2) = 4 unify(2,3) = 5 unify(1,3) = fail

2007CLINT-LIN-FEATSTR20 Paths Portions of a feature structure can be referred to using the path notation. A path is a sequence of one or more feature names enclosed in angled brackets ( ). For instance, (1) (2) (3) Paths are used to express feature constraints,

2007CLINT-LIN-FEATSTR21 Examples of Constraints = indef =

2007CLINT-LIN-FEATSTR22 Constraint Equations The feature constraints associated with phrase structure rules in PC-PATR consist of a set ofunification expressions. Each expression has three parts, in this order: a feature path, the first element of which is one of the symbols from the phrase structure rule an equal sign (=) either a simple value, or another feature path that also starts with a symbol from the phrase structure

2007CLINT-LIN-FEATSTR23 Execution of Equations Each equation is interpreted as an instruction to unify the left and right hand sides First, each side is "evaluated" before any unification is attempted. If the path does not exist it is created. After successful unification, the two structures are not merely equivalent, but identical, so that any changes to one affect changes to the other.

2007CLINT-LIN-FEATSTR24 Lexical Entries Lexical entries define the basic properties of words. Each definition divided into fields, each of which begins with a standard format marker at the beginning of a line. –\w the lexical form of the word, –\c word category (part of speech) –\g word gloss –\f additional features of this word

2007CLINT-LIN-FEATSTR25 Lexical Entry Examples \w fox \c N \g canine \f = singular \w foxes \c N \g canine+PL \f = plural

2007CLINT-LIN-FEATSTR26 Corresponding Feature Structures When these entries are used by the grammar, they are represented by these feature structures: [ cat: N gloss: canine lex: foxes number: singular ] [ cat: N gloss: canine+PL lex: foxes number: plural ]