Features & Unification

  • View
    65

  • Download
    1

Embed Size (px)

DESCRIPTION

Features & Unification. CMSC 35100 Intro to NLP January 12, 2006. Roadmap. Features: Motivation Constraint & compactness Features Definitions & representations Unification Application of features in the grammar Agreement, subcategorization Parsing with features & unification - PowerPoint PPT Presentation

Text of Features & Unification

  • Features & UnificationCMSC 35100Intro to NLPJanuary 12, 2006

  • RoadmapFeatures: MotivationConstraint & compactnessFeaturesDefinitions & representationsUnificationApplication of features in the grammarAgreement, subcategorizationParsing with features & unificationAugmenting the Earley parser, unification parsingExtensions: Types, inheritance, etcConclusion

  • Constraints & CompactnessConstraints in grammarS -> NP VPBut *They runs, *He run, *He disappeared the flightViolate agreement (number), subcategorizationEnforcing constraintsAdd categories, rulesS-> NPsg3p VPsg3p, S-> NPpl3p VPpl3p, VP-> Vtrans NP, VP -> Vintrans, VP->Vditrans NP NPExplosive!, loses key generalizations

  • Why features?Need compact, general constraintsS -> NP VPOnly if NP and VP agreeHow can we describe agreement, subcat?Decompose into elementary features that must be consistentE.g. AgreementNumber, person, gender, etc Augment CF rules with feature constraintsDevelop mechanism to enforce consistencyElegant, compact, rich representation

  • Feature RepresentationsFundamentally, Attribute-Value pairsValues may be symbols or feature structuresFeature path: list of features in structure to valueReentrant feature structures: share some structRepresented as Attribute-value matrix (AVM), orDirected acyclic graph (DAG)

  • AVMNUMBER PLPERSON 3NUMBER PL

    PERSON 3CAT NP

    NUMBER PL

    PERSON 3CAT NP

    AGREEMENTNUMBER PL

    PERSON 3CAT S

    HEAD AGREEMTNUMBER PL

    PERSON 31SUBJECT AGREEMENT 1

  • Graph Representation

  • UnificationTwo key roles:Merge compatible feature structuresReject incompatible feature structuresTwo structures can unify ifFeature structures are identicalResult in same structureFeature structures match where both have values, differ in missing or underspecifiedResulting structure incorporates constraints of both

  • SubsumptionRelation between feature structuresLess specific f.s. subsumes more specific f.s.F.s. F subsumes f.s. G iffFor every feature x in F, F(x) subsumes G(x)For all paths p and q in F s.t. F(p)=F(q), G(p)=G(q)Examples:A: [Number SG], B: [Person 3]C:[Number SG][Person 3]A subsumes C; B subsumes C; B,A dont subsumePartial order on f.s.

  • Unification ExamplesIdentical[Number SG] U [Number SG]=[Number SG]Underspecified[Number SG] U [Number []] = [Number SG]Different specification[Number SG] U [Person 3] = [Number SG] [Person 3]Mismatched[Number SG] U [Number PL] -> Fails!

  • More Unification ExamplesAGREEMENT [1]

    SUBJECT AGREEMENT [1]SUBJECT AGREEMENTPERSON 3NUMBER SGU=SUBJECT AGREEMENT [1]PERSON 3NUMBER SGAGREEMENT [1]

  • Features in CFGs: AgreementGoal: Support agreement of NP/VP, Det NominalApproach:Augment CFG rules with featuresEmploy head featuresEach phrase: VP, NP has headHead: child that provides features to phraseAssociates grammatical role with word VP V; NP Nom, etc

  • Agreement with Heads and FeaturesVP -> Verb NP =

    NP -> Det Nominal = =

    Nominal -> Noun =

    Noun -> flights = PL

    Verb -> serves = SG = 3

  • Feature ApplicationsSubcategorization:Verb-Argument constraintsNumber, type, characteristics of args (e.g. animate)Also adjectives, nouns

    Long distance dependenciesE.g. filler-gap relations in wh-questions, rel

  • Implementing UnificationData Structure:Extension of the DAG representationEach f.s. has a content field and a pointer fieldIf pointer field is null, content field has the f.s.If pointer field is non-null, it points to actual f.s.

  • Implementing Unification: IIAlgorithm:Operates on pairs of feature structuresOrder independent, destructiveIf fs1 is null, point to fs2If fs2 is null, point to fs1If both are identical, point fs1 to fs2, return fs2Subsequent updates will update bothIf non-identical atomic values, fail!

  • Implementing Unification: IIIIf non-identical, complex structuresRecursively traverse all features of fs2If feature in fs2 is missing in fs1Add to fs1 with value nullIf all unify, point fs2 to fs1 and return fs1

  • ExampleAGREEMENT [1] NUMBER SG

    SUBJECT AGREEMENT [1]SUBJECT AGREEMENT PERSON 3U[ AGREEMENT [1]] U [AGREEMENT [PERSON 3]]

    [NUMBER SG] U [PERSON 3]

    [NUMBER SG] U [PERSON 3][PERSON NULL]

  • Unification and the Earley ParserEmploy constraints to restrict addition to chartActually pretty straightforwardAugment rules with feature structureAugment state (chart entries) with DAGPrediction adds DAG from ruleCompletion applies unification (on copies)Adds entry only if current DAG is NOT subsumed

  • Unification ParsingAbstracts over categoriesS-> NP VP =>X0 -> X1 X2; = S; =NP; =VPConjunction:X0->X1 and X2; =; =Issue: Completer depends on categoriesSolution: Completer looks for DAGs which unify with the just-completed states DAG

  • ExtensionsTypes and inheritanceIssue: generalization across feature structuresE.g. many variants of agreement More or less specific: 3rd vs sg vs 3rdsgApproach: Type hierarchySimple atomic types match literallyMultiple inheritance hierarchyUnification of subtypes is most general type that is more specific than two input typesComplex types encode legal features, etc

  • ConclusionFeatures allow encoding of constraintsEnables compact representation of rulesSupports natural generalizations

    Unification ensures compatibility of featuresIntegrates easily with existing parsing mech.

    Many unification-based grammatical theories