Presentation on theme: " Christel Kemke 2007/08 COMP 4060 Natural Language Processing Feature Structures and Unification."— Presentation transcript:
Christel Kemke 2007/08 COMP 4060 Natural Language Processing Feature Structures and Unification
2007/08 Christel Kemke Feature Structures and Unification What are Features? Feature Structures, Agreement Feature Structures as Graphs Feature Constraints in Grammar Rules Inheritance of Features Using Features Features and the Lexicon
2007/08 Christel Kemke Feature Structures and Parsing - Overview Feature Structures describe additional syntactic-semantic information, like category, person, number, e.g. goes specify feature constraints and agreements on features as part of the grammar rules or through a feature structure graph during parsing, check agreements and constraints of feature structures (use special unification)
2007/08 Christel Kemke Feature Structures Feature structures describe linguistic attributes or features like number, person associated with words or syntactic constituents like noun phrase. Feature structures are sets of features and values, e.g. hat[Numbersing ] buys Person3 Numbersing
2007/08 Christel Kemke Feature Structures - Agreement Feature structures can be collected in one ‘variable’ called agreement. buys agreement Person 3 Number sing
2007/08 Christel Kemke Add to feature structure category cat: buys cat verb agreement Person 3 Number sing Feature Structures and Categories
2007/08 Christel Kemke Feature Structures as Constraints Ungrammatical sentences like “He go” or “We goes” can be excluded using feature constraints. example S → NP VP = = or S → NP VP =
2007/08 Christel Kemke Compare and combine feature structures (unification): “he buys” buys cat verb agreement Person 3 Number sing he cat noun agreement Person 3 Number sing Feature Structures and Unification
2007/08 Christel Kemke Unification of Feature Structures The unification ⊔ of feature structures is according to the rules: [feature i value i ] ⊔ [feature i value i ] = [feature i value i ] [feature i value i ] ⊔ [feature i value j ] = fail, if value i value j [feature i value i ] ⊔ [feature i undef.] = [feature i value i ] [feature i value i ] ⊔ [feature j value j ] = feature i value i feature j value j if feature i feature j
2007/08 Christel Kemke Inheriting Features Agreements are passed on to / inherited within phrases, e.g. agreement of VP derived from Head-Verb of VP: VP →... Verb... = NP →... Nom... = We can use references to feature structures (graph) to make this easier.
2007/08 Christel Kemke Referencing Feature Structures “AGREEMENT” labelled 1 in feature structure for sentence (CAT S). Labelled reference can be used to express constraints for unification, e.g. “The agreement of the HEAD of a sentence is the same as the agreement of the SUBJECT”.
For locating constraints, traverse paths in graph.
2007/08 Christel Kemke "Inheritance" of Feature Structures Feature structures are "inherited" during parsing or generation, using the feature structure of the head of a phrase: NP det Nom NP i=1,..,n det Nom i=1,..,n Nom i=1,..,n pre-Nom Nom i=1,..,n post-Nom Complex feature structures are often referenced through identifying numbers. Constraints on feature structures can be checked using these references; and the same feature structure can be used in different parts of the parse tree through reference (shared structure). head
2007/08 Christel Kemke Features and Subcategorization NP modifiers: central noun + modifiers + agreement “... the man who chased the cat out of the house...” NP - determined by man - Verb complements: central verb + complements + agreements “... the man chased the barking dog who bit him...” VP- determined by chased-
2007/08 Christel Kemke Lexical Entries in Unification Grammar We can use lexicon entries to describe constraints, like verb complements, and include them in the grammar rules using feature equations. Example: want uses VP_to Verb want Verb HEAD SUBCAT FIRST CAT = VP Verb HEAD SUBCAT FIRST FORM = INFINITIVE This rule expresses that the verb want has a VP in infinitive form (VP_to) as complement.
2007/08 Christel Kemke Lexical Entries in Feature Structures We can also write these constraints, like verb complements, directly into the feature structures. The structure below is for want with 2 complements: NP and VP_to, written as list ... .
2007/08 Christel Kemke Parsing with Features Features in the form of graph structures or as part of annotated grammar rules are used during parsing or generation of sentences to check constraints and agreements between syntactic categories. See Eisner presentation. Features can also be used to express semantic information. See Semantics presentation.
2007/08 Christel Kemke References Jurafsky, 2nd edition, Ch. 16 Allen Ch. 4 and 5