Skip to content

Commit

Permalink
upper-cased feature names
Browse files Browse the repository at this point in the history
svn/trunk@4406
  • Loading branch information
Ewan Klein committed Apr 23, 2007
1 parent ef0f52d commit 7429fc8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 30 deletions.
37 changes: 19 additions & 18 deletions examples/parse/feat0.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,37 @@
#############################

# S expansion rules
S -> NP[num=?n] VP[num=?n]
S -> NP[NUM=?n] VP[NUM=?n]

# NP expansion rules
NP[num=?n] -> N[num=?n]
NP[num=?n] -> PropN[num=?n]
NP[num=?n] -> Det[num=?n] N[num=?n]
NP[num=pl] -> N[num=pl]
NP[NUM=?n] -> N[NUM=?n]
NP[NUM=?n] -> PropN[NUM=?n]
NP[NUM=?n] -> Det[NUM=?n] N[NUM=?n]
NP[NUM=pl] -> N[NUM=pl]

# VP expansion rules
VP[tense=?t, num=?n] -> IV[tense=?t, num=?n]
VP[tense=?t, num=?n] -> TV[tense=?t, num=?n] NP
VP[TENSE=?t, NUM=?n] -> IV[TENSE=?t, NUM=?n]
VP[TENSE=?t, NUM=?n] -> TV[TENSE=?t, NUM=?n] NP

#############################
# Lexical Rules
#############################

Det[num=sg] -> 'this' | 'every'
Det[num=pl] -> 'these' | 'all'
Det[NUM=sg] -> 'this' | 'every'
Det[NUM=pl] -> 'these' | 'all'
Det -> 'the' | 'some'

PropN[num=sg]-> 'Kim' | 'Jody'
PropN[NUM=sg]-> 'Kim' | 'Jody'

N[num=sg] -> 'dog' | 'girl' | 'car' | 'child'
N[num=pl] -> 'dogs' | 'girls' | 'cars' | 'children'
N[NUM=sg] -> 'dog' | 'girl' | 'car' | 'child'
N[NUM=pl] -> 'dogs' | 'girls' | 'cars' | 'children'

IV[tense=pres, num=sg] -> 'disappears' | 'walks'
TV[tense=pres, num=sg] -> 'sees' | 'likes'
IV[TENSE=pres, NUM=sg] -> 'disappears' | 'walks'
TV[TENSE=pres, NUM=sg] -> 'sees' | 'likes'

IV[tense=pres, num=pl] -> 'disappear' | 'walk'
TV[tense=pres, num=pl] -> 'see' | 'like'
IV[TENSE=pres, NUM=pl] -> 'disappear' | 'walk'
TV[TENSE=pres, NUM=pl] -> 'see' | 'like'

IV[tense=past, num=?n] -> 'disappeared' | 'walked'
TV[tense=past, num=?n] -> 'saw' | 'liked'
IV[TENSE=past, NUM=?n] -> 'disappeared' | 'walked'
TV[TENSE
=past, NUM=?n] -> 'saw' | 'liked'
24 changes: 12 additions & 12 deletions examples/parse/feat1.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@
#############################

# S expansion rules
S[-inv] -> NP S/NP
S[-inv]/?x -> NP VP/?x
S[+inv]/?x -> V[+aux] NP VP/?x
S-BAR/?x -> Comp S[-inv]/?x
S[-INV] -> NP S/NP
S[-INV]/?x -> NP VP/?x
S[+INV]/?x -> V[+AUX] NP VP/?x
S-BAR/?x -> Comp S[-INV]/?x

# NP expansion rules
NP/NP ->

# VP expansion rules
VP/?x -> V[subcat=1, -aux] NP/?x
VP/?x -> V[subcat=2, -aux] Sbar/?x
VP/?x -> V[subcat=3, +aux] VP/?x
VP/?x -> V[SUBCAT=1, -AUX] NP/?x
VP/?x -> V[SUBCAT=2, -AUX] S-BAR/?x
VP/?x -> V[SUBCAT=3, +AUX] VP/?x

#############################
# Lexical Rules
#############################

V[subcat=1, -aux] -> 'see' | 'like'
V[subcat=2, -aux] -> 'say' | 'claim'
V[subcat=3, +aux] -> 'do' | 'can'
V[SUBCAT=1, -AUX] -> 'see' | 'like'
V[SUBCAT=2, -AUX] -> 'say' | 'claim'
V[SUBCAT=3, +AUX] -> 'do' | 'can'

NP[-wh] -> 'you' | 'children' | 'girls'
NP[+wh] -> 'who'
NP[-WH] -> 'you' | 'children' | 'girls'
NP[+WH] -> 'who'

Comp -> 'that'

0 comments on commit 7429fc8

Please sign in to comment.