Top Banner
88-680 1 Text Books Text Books - תתתתת תתתת תתתתתת תתתתת תתתChart Parsing (cont) Features and Unification תתתת תתת תתתתתת תתתתת תתתתת תתתתתתתתתת תת תתתת
39

Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

Dec 19, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 1

Text Books 

Text Books 

עיבוד שפות טבעיות - שיעור עשרChart Parsing (cont)

Features and Unification

עידו דגן

המחלקה למדעי המחשב

אוניברסיטת בר אילן

Page 2: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 2

Text Books 

Text Books 

Page 3: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 3

Text Books 

Text Books 

Page 4: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 4

Text Books 

Text Books 

Page 5: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 5

Text Books 

Text Books 

Page 6: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 6

Text Books 

Text Books 

Page 7: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 7

Text Books 

Text Books 

Complexity

• O(N3)

• Constant depends on grammar parameters

Page 8: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 8

Text Books 

Text Books 

Features and Unification

Page 9: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 9

Text Books 

Text Books 

Problems with simple context-free grammars

• Subcategorization• Agreement

– Number of non-terminal symbols explodes

– Massive redundancy

– Lack of linguistically significant generalizations

• Solution: Features• Idea behind:Grammatical categories are no longer

atomic but complex with an internal structure

Page 10: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 10

Text Books 

Text Books 

Agreement

• Sample rule that takes into account features: S NP VP(but only if the number of the NP is equal to the number of the VP)

Page 11: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 11

Text Books 

Text Books 

Feature structures

• Feature structures are sets of feature-value pairs (also called attribute-value pairs)

• The common notation for a feature structure is an attribute-value matrix(AVM) e.g.

Page 12: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 12

Text Books 

Text Books 

Feature structures

• Features are atomic symbols

• Values are atomic symbols or complex feature structures e.g.

Page 13: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 13

Text Books 

Text Books 

Feature structuresCAT NPNUMBER SINGULARPERSON 3

CAT NP

AGREEMENT NUMBER SG PERSON 3

Feature paths: {x agreement number}

Page 14: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 14

Text Books 

Text Books 

Feature structures

• Feature structures can also be described as feature paths, i.e.directed acyclic graphs whose arcs are labeled with features names and values appear as nodes

Page 15: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 15

Text Books 

Text Books 

Feature structures

• A feature structure is a partial function from features to their values, i.e.– Each feature structure is specified only once for

each feature– A particular feature structure does not have to

be specified for all its possible features (underspecification)

Page 16: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 16

Text Books 

Text Books 

Feature structures• Feature structures must be consistent and feature paths

must be unique,– a feature may not have two different values on the same

“node”– The same feature can not appear twice at the same “node” of

a feature structure

• but it is possible to assign the same value to more than one feature (reentrancy or structure sharing)– Reentrant feature structures share precisely the same

value (or node in the graph), they not only have equal values– A shared value is notated by coindexing boxes

Page 17: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 17

Text Books 

Text Books 

Feature structures

• Example of reentrancy

Page 18: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 18

Text Books 

Text Books 

Feature structures

• Example of reentrancy in graph notation

Page 19: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 19

Text Books 

Text Books 

Subsumption

• There is an ordering relation between feature structures: a less specific feature structure subsumes an equally or more specific one e.g.– [Cat NP] subsumes

• Subsumption corresponds to the subset relation in set theory

• The subsumption relation is represented by the binary operator ⊑

Page 20: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 20

Text Books 

Text Books 

Subsumption

• Formally, a feature structure F subsumes a feature structure G, i.e. F ⊑ G, if and only if:

• For every feature x in F, – If F(x) is an atomic symbol then G(x) is defined and is

the same symbol– Otherwise F(x) ⊑ G(x)

• For all paths p and q in F such that F(p) = F(q) (reentrancy), it is also the case that G(p) = G(q)

Page 21: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 21

Text Books 

Text Books 

Page 22: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 22

Text Books 

Text Books 

Subsumption

• Subsumption is a partial ordering relation between feature structures (i.e. there are pairs of feature structures that neither subsume nor are subsumed by each other)

• There are two cases in which the ordering relation does not hold:– if feature structures contain different information

– if they contain conflicting information

Page 23: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 23

Text Books 

Text Books 

Unification of feature structures

• Unification is an operation for– combining information (merging the

information content of two feature structures, used when combining parse constituents)

– Comparing information (rejecting the merger of incompatible features)

– Unification is represented as the binary operator

Page 24: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 24

Text Books 

Text Books 

Unification of feature structures• The unified feature structure contains all the

information from the unified feature structures but no additional information

• Unification is monotonic, i.e.the unified feature structure still satisfies the original feature structure(no values are overwritten)

• Unification corresponds to the union operation in set theory, but may fail in case of incompatible information, i.e. feature structures have to be consistent even when they are the result of a unification

Page 25: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 25

Text Books 

Text Books 

Unification of feature structures

• Formally, the unification of two feature structures F and G is defined as the most general feature structure H, such that F ⊑ H and G ⊑ H This is notated as H = F ⊔ G

Page 26: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 26

Text Books 

Text Books 

Unification of feature structures

• Examples– Equality test:

[Number sg] ⊔ [Number sg] = [Number sg]– Incompatible values

[Number sg] ⊔ [Number pl] = fails– [ ] value compatible with any value

[Number sg] ⊔ [Number []] = [Number sg]– Adding information

[Number sg] ⊔ [Person 3] = Number sg Person 3

Page 27: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 27

Text Books 

Text Books 

Examples for unification of feature structures(contd.)

• Unification of features with similar values

Page 28: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 28

Text Books 

Text Books 

Examples for unification of feature structures(contd.)

• Unification of features with identical values

Page 29: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 29

Text Books 

Text Books 

Examples for unification of feature structures(contd.)

• Further copying (instantiation)

Page 30: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 30

Text Books 

Text Books 

Examples for unification of feature structures(contd.)

• Example of failure to unify

Page 31: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 31

Text Books 

Text Books 

Feature structures in the grammar

• CF grammar rules can be augmented with feature structures and with unification operations to express constraints on the constituents of a rule

• An example notation (the PATR-II formalism):β 0 β 1... β n {set of constraints}– Where the constraints have one of the following two

forms:• < βi feature path> =(unify) atomic value

• < βi feature path> =(unify) < βj feature path>

– e.g.S NP VP<NP NUMBER> = <VP NUMBER>

Page 32: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 32

Text Books 

Text Books 

Feature structures in the grammar

• S NP VP{NP AGREEMENT} = {VP AGREEMENT}– This flight serves breakfast– These flights serve breakfast

• S Aux NP VP{Aux AGREEMENT} = {NP AGREEMENT}– Does this flight serve breakfast?– Do these flights serve breakfast?

Page 33: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 33

Text Books 

Text Books 

Feature structures in the grammar

• NP Det Nominal<Det AGREEMENT> = <Nominal AGREEMENT><NP AGREEMENT> = <Nominal AGREEMENT>– this flight vs. these flights

Page 34: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 34

Text Books 

Text Books 

Feature structures in the grammar

• Lexical constituents receive their agreement features directly from the lexicon– Aux does

<Aux AGREEMENT NUMBER> = sg<Aux AGREEMENT PERSON> = 3

– Det this<Aux AGREEMENT NUMBER> = sg

– Det these<Aux AGREEMENT NUMBER> = pl

Page 35: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 35

Text Books 

Text Books 

Feature structures in the grammar

• Verb serve<Verb AGREEMENT NUMBER> = pl

• Verb serves<Verb AGREEMENT NUMBER> = sg<Verb AGREEMENT PERSON> = 3

• Non-lexical constituents(e.g. VPs) receive agreement values from their constituents

• VP Verb NP<VP AGREEMENT> = <Verb AGREEMENT>

Page 36: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 36

Text Books 

Text Books 

Feature structures in the grammar

• Agreement (NP and Nominal)– Noun flight

<Noun AGREEMENT NUMBER> = sg– Noun flights

<Noun AGREEMENT NUMBER> = pl– Nominal Noun

<Nominal AGREEMENT> = <Noun AGREEMENT>

Page 37: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 37

Text Books 

Text Books 

Feature structures in the grammar• For most grammatical categories, the features are

copied from one child to the parent• The child that provides the features is called the head

of the phrase (the features are the head features)– VP Verb NP

<VP AGREEMENT> = <Verb AGREEMENT>– NP Det Nominal

<Det AGREEMENT> = <Nominal AGREEMENT><NP AGREEMENT> = <Nominal AGREEMENT>

– Nominal Noun<Nominal AGREEMENT> = <Noun AGREEMENT>

Page 38: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 38

Text Books 

Text Books 

Subcategorization

• VP Verb {Verb SUBCAT} = INTRANS

• VP Verb NP {Verb SUBCAT} = TRANS

• VP Verb NP NP {Verb SUBCAT} = DITRANS

Page 39: Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books 88-6801 עיבוד שפות טבעיות - שיעור עשר Chart Parsing (cont) Features.

88-680 39

Text Books 

Text Books