190 likes | 327 Views
COMP 4060 Natural Language Processing. Feature Structures and Unification. Feature Structures and Unification. What are Features? Feature Structures, Agreement Feature Structures as Graphs Feature Constraints in Grammar Rules Inheritance of Features Using Features
E N D
COMP 4060 Natural Language Processing Feature Structures and Unification
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
Feature Structures and Parsing - Overview Feature Structures • describe additional syntactic-semantic information, like category, person, number, e.g. goes <verb, 3rd, singular> • specifyfeature 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)
Feature Structures • Feature structures describe linguistic attributes or features like number, personassociated with words or syntactic constituents like noun phrase. • Feature structures are sets of features and values, e.g. hat [Number sing ] buysPerson 3 Number sing
Feature Structures - Agreement Feature structures can be collected in one ‘variable’ called agreement. buysagreementPerson 3 Number sing
Feature Structures and Categories Add to feature structure category cat: buyscatverb agreementPerson 3 Number sing
verb Feature Structure Graph
Feature Structures as Constraints Ungrammatical sentences like “He go” or “We goes” can be excluded using feature constraints. example S → NP VP <NP number> = <VP number> <NP person> = <VP person> or S → NP VP <NP agreement> = <VP agreement>
Feature Structures and Unification Compare and combine feature structures (unification): “he buys” buyscatverb agreementPerson 3 Number sing hecatnoun agreement Person 3 Number sing
Unification of Feature Structures The unification ⊔of feature structures is according to the rules: [featurei valuei] ⊔ [featurei valuei] = [featurei valuei] [featurei valuei] ⊔ [featurei valuej] = fail, if valueivaluej [featurei valuei] ⊔ [featureiundef.] = [featurei valuei] [featurei valuei] ⊔ [featurej valuej] = featurei valueifeaturej valuej if featurei featurej
Inheriting Features Agreements are passed on to / inherited within phrases, e.g. agreement of VP derived from Head-Verb of VP: VP → ... Verb ...<VP agreement> = <Head/Verb agreement> NP → ... Nom ... <NP agreement> = <Head/Nom agreement> We can use references to feature structures (graph) to make this easier.
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”.
"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 <fivi>i=1,..,n det Nom<fivi>i=1,..,n Nom <fivi>i=1,..,n pre-Nom Nom<fivi>i=1,..,npost-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
Features and Subcategorization NP modifiers: central noun+modifiers+agreement “... the man who chased the cat out of the house ...” NP -<agreement> determined by man-<agreement> Verb complements: central verb+complements+agreements “... the man chased the barking dog who bit him ...” VP-<agreement> determined by chased-<agreement>
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 usesVP_to Verb want Verb HEAD SUBCAT FIRST CAT = VP Verb HEAD SUBCAT FIRST FORM = INFINITIVE This rule expresses that the verb wanthas a VP in infinitive form (VP_to) as complement.
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 ....
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.
References • Jurafsky, 2nd edition, Ch. 16 • Allen Ch. 4 and 5