Download - Features and Augmented Grammars
![Page 1: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/1.jpg)
1
Features and Augmented Grammars
Allen’s Chapter 4
J&M’s Chapter 11
![Page 2: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/2.jpg)
2
Augmenting CFGs with Features
• Certain linguistic constraints are not naturally described via CFGs
• Example: Number Agreement between constituents - “a boys”
• Possible to describe using refined CF rules:NP-Sing --> ART-Sing N-SingNP-Plural --> ART-Plural N-Plural
• Much more natural to describe via a single feature Number in an augmented CF rule:
NP --> ART N (only when Number1 = Number2)
![Page 3: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/3.jpg)
3
Feature Structures
• Constituents can be viewed as feature structures that map values to features
• Features can be shared between constituents
• Some basic features for English:
– Number, Gender and Person agreement
– Verb form features and sub-categorizations
• Complex Feature Structures: Feature values can themselves be feature structures
![Page 4: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/4.jpg)
4
An Example
ART1: (CAT ART
ROOT a
NUMBER s)
Represents a particular use of word a
Often summarized as:
ART1: (ART ROOT a NUMBER s)
![Page 5: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/5.jpg)
5
Larger constituents:
Representing an NP constituent for the phrase a fish
NP1: (NP NUMBER s
1 (ART ROOT a
NUMBER s)
2 (N ROOT fish
NUMBER s))
![Page 6: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/6.jpg)
6
Feature Structure
![Page 7: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/7.jpg)
7
Augmented Rules
(NP NUMBER ?n) (ART NUMBER ?n) (N NUMBER ?n)
*(NP 1 (ART NUMBER s) 2 (N NUMBER s))
*(NP NUMBER s1 (ART NUMBER s)2 (N NUMBER p))
![Page 8: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/8.jpg)
8
Using Variables to Express ambiguities
(N ROOT fish NUMBER ?n)
(N ROOT fish NUMBER ?b {s, p})
(N ROOT fish NUMBER {s, p})
![Page 9: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/9.jpg)
9
Basic Features in English: Number Agreement
![Page 10: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/10.jpg)
10
Person and Number Features
![Page 11: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/11.jpg)
11
PForm Feature
![Page 12: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/12.jpg)
12
Verb Sub categorizations:SUBCAT Feature
![Page 13: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/13.jpg)
13
SUBCAT Examples:
(VP) (V SUBCAT _np_vp:inf)
(NP)
(VP VFORM inf)
(VP) (V SUBCAT _np_pp:loc)
(NP)
(PP PFORM LOC)
![Page 14: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/14.jpg)
14
Binary Features
Whether the constituent does or does not have a feature
INV feature has two values + and –
Jack Laughed
has an INV feature with value – = (-INV)
Did Jack Laugh
has an INV feature with value + = (+INV)
![Page 15: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/15.jpg)
15
Morphological Analysis
![Page 16: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/16.jpg)
16
![Page 17: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/17.jpg)
17
Sample Grammar (Abbreviated Form)
![Page 18: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/18.jpg)
18
Sample Grammar (Detailed Form)
![Page 19: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/19.jpg)
19
Parsing with Features
1. (NP AGR ?a) (ART AGR ?a) (N AGR ?a)
2. (ART ROOT A AGR 3s)
3. (NP AGR 3s) (ART AGR 3s) (N AGR 3s)
4. (NP AGR 3s) (ART AGR 3s) (N AGR 3s)
5. (N ROOT DOG1 AGR 3s)
6. (NP AGR 3s) (ART AGR 3s) (N AGR 3s)
![Page 20: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/20.jpg)
20
Parsing with Features
• Given an arc A, and NEXT as the constituent following , and a new constituent X, which is used to extend A
1. Find an instantiation of variables such that all features specified in NEXT are found in X.
2. Create a new arc A’, which is a copy of A except for the instantiations of the variables determined in step 1
3. Update A’ as usual in a Chart parser
![Page 21: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/21.jpg)
21
Parse Trees with Features
![Page 22: Features and Augmented Grammars](https://reader036.vdocuments.site/reader036/viewer/2022062410/56815a64550346895dc7aa56/html5/thumbnails/22.jpg)
22
Chart with Features