Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "2007CLINT-LIN-FEATSTR1 Computational Linguistics for Linguists Feature Structures."— Presentation transcript:

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

2 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

3 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

4 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

5 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

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

7 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

8 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?

9 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

10 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).

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

12 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

13 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.

14 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 …

15 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

16 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.

17 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 ]]]

18 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 ] ]

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

20 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,

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

22 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

23 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.

24 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

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

26 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 ]


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

Similar presentations


Ads by Google