-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
svn/trunk@7122
- Loading branch information
Ewan Klein
committed
Dec 5, 2008
1 parent
68d5331
commit 2a46021
Showing
53 changed files
with
2,157 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
P -> IS AS | ||
AS -> IS ADI | ||
AS -> ADI | ||
IS -> IM erl_atz | ||
IM -> ize_arr | ||
IM -> ize_izb | ||
ADI -> adt | ||
erl_atz -> "k" | "a" | ||
ize_arr -> "ardo" | "egunkari" | "baloi" | ||
ize_izb -> "Pintxo" | "Kepa" | ||
adt -> "dakar" | "darama" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
% start AS | ||
# ############################ | ||
# Grammar Rules | ||
# ############################ | ||
# AS expansion rules | ||
AS[ergnum=?n1, absnum=?n2] -> IS[kas=erg, num=?n1] AS[ergnum=?n1, absnum=?n2] | ||
AS[ergnum=?n1, absnum=?n2] -> AS[ergnum=?n1, absnum=?n2] IS[kas=erg, num=?n1] | ||
AS[ergnum=?n1, absnum=?n2] -> IS[kas=abs, num=?n2] AS[ergnum=?n1, absnum=?n2] | ||
AS[ergnum=?n1, absnum=?n2] -> AS[ergnum=?n1, absnum=?n2] IS[kas=abs, num=?n2] | ||
IS[kas=?k, num=?n] -> ize[azp=arr] knmdek[kas=?k, num=?n] | ||
AS[ergnum=?n1, absnum=?n2] -> adt[ergnum=?n1, absnum=?n2] | ||
# ############################ | ||
# Lexicon | ||
# ############################ | ||
adt[ergnum=hu, absnum=hu] -> 'dakar' | 'darama' | ||
adt[ergnum=hk, absnum=hu] -> 'dakarte' | 'daramate' | ||
knmdek[kas=erg, num=hu] -> 'ak' | ||
knmdek[kas=erg, num=hk] -> 'ek' | ||
knmdek[kas=abs, num=hk] -> 'ak' | ||
knmdek[kas=abs, num=hu] -> 'a' | ||
ize[azp=arr] -> 'zakur' | 'gizon' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
as -> mendekoa as [0.15] | ||
as -> adlg mendekoa as [0.31] | ||
as -> adlg adlg mendekoa as [0.08] | ||
as -> adi adl [0.46] | ||
mendekoa -> adlg mendekoa [0.37] | ||
mendekoa -> adlg adlg mendekoa [0.09] | ||
mendekoa -> 'joatea' [0.18] | ||
mendekoa -> 'joateko' [0.27] | ||
mendekoa -> 'sartzera' [0.09] | ||
adi -> 'esan' [0.5] | ||
adi -> 'debekatzen' [0.33] | ||
adi -> 'eraman' [0.17] | ||
adl -> 'zuen' [0.17] | ||
adl -> 'zioten' [0.83] | ||
adlg -> 'bozgorailuarekin' [0.28] | ||
adlg -> 'euskal_presoekin' [0.18] | ||
adlg -> 'epaitegian' [0.09] | ||
adlg -> 'mendira' [0.18] | ||
adlg -> 'ejertzitoan' [0.09] | ||
adlg -> 'derrigorrean' [0.09] | ||
adlg -> 'lagunekin' [0.09] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
NP: {<IZE.*>+<ADJ.*>*<DET.*>*} """ # adjetibo edo determinatzaileei loturiko izenak nahiz izen segidak topatzen ditu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
S -> is as | ||
is -> ize adj | ior | ||
ize -> 'gaizkile' | 'epaile' | 'bizilagun' | ||
adj -> 'gaiztoek' | 'gaiztoak' | 'kanpotarrak' | 'kanpotarrek' | 'berriak' | 'berriek' | ||
ior -> 'haiek' | 'hark' | ||
as -> mendekoa as | adlg mendekoa as | adlg adlg mendekoa as | adi adl | ||
mendekoa -> adlg mendekoa | adlg adlg mendekoa | 'joatea' | 'joateko' | 'sartzera' | ||
adi -> 'esan' | 'debekatzen' | 'eraman' | ||
adl -> 'zuen' |'zioten' | ||
adlg -> 'bozgorailuarekin' | 'euskal_presoekin' | 'epaitegian' | 'mendira' | 'ejertzitoan' | 'derrigorrean' | 'lagunekin' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
% start S | ||
# ############################ | ||
# Grammar Rules | ||
# ############################ | ||
S -> IS[kas=erg] AS/IS | ||
# IS erregelak | ||
IS[kas=?k, num=?n] -> ize[azp=arr] knmdek[kas=?k, num=?n] | ||
IS[kas=?k, num=?n] -> ize[azp=ber] knmdek[kas=?k, num=?n] | ||
IS[kas=?k, num=?n]/IS -> | ||
# AS erregelak | ||
AS[ergnum=?n1, absnum=?n2]/?x -> IS[kas=abs, num=?n1]/?x AS[ergnum=?n1, absnum=?n2] | ||
AS[ergnum=?n1, absnum=?n2] -> adi adl[ergnum=?n1, absnum=?n2] | ||
# ############################ | ||
# Lexicon | ||
# ############################ | ||
knmdek[kas=erg, num=hu] -> 'ak' | ||
knmdek[kas=erg, num=hk] -> 'ek' | ||
knmdek[kas=abs, num=hk] -> 'ak' | ||
knmdek[kas=abs, num=hu] -> 'a' | ||
ize[azp=arr] -> 'bizilagun' | 'aita' | 'gizon' | 'emakume' | ||
ize[azp=ber] -> 'Kepa' | 'Ainara' | ||
adi -> 'ekarri' | 'eraman' | 'puskatu' | 'lapurtu' | ||
adl[ergnum=hu, absnum=hu] -> 'du' | 'zuen' | ||
adl[ergnum=hk, absnum=hu] -> 'dute' | 'zuten' | ||
adl[ergnum=hu, absnum=hk] -> 'ditu' | 'zituen' | ||
adl[ergnum=hk, absnum=hk] -> 'dituzte' | 'zituzten' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
IS -> IZE_ARR [0.5] | IZE_ARR ADJ [0.3] | IS LOT IS [0.2] | ||
IZE_ARR -> 'gizon' [0.1] | 'emakume' [0.2] | 'ume' [0.3] | IZE_ARR LOT IZE_ARR [0.4] | ||
ADJ -> 'zaharrak' [0.4] | 'gazteak' [0.6] | ||
LOT -> 'eta' [0.9] | 'edo' [0.1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
NP: {<IZE.*><ADJ.*>*<DET.*>*} # adjetibo edo determinatzaileei loturiko izenak topatzen ditu | ||
NP: {<IZE.*>+} # izen segidak topatzen ditu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
IS -> IZE_ARR | IZE_ARR ADJ | IS LOT IS | ||
IZE_ARR -> 'gizon' | 'emakume' | 'ume' | IZE_ARR LOT IZE_ARR | ||
ADJ -> 'zaharrak' | 'gazteak' | ||
LOT -> 'eta' | 'edo' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
% start S | ||
# ############################ | ||
# Grammar Rules | ||
# ############################ | ||
|
||
## NORK-NOR Kasuak | ||
|
||
S -> IS[kas=erg] AS/IS | ||
# IS erregelak | ||
IS[kas=?k, num=?n] -> ize[azp=arr] knmdek[kas=?k, num=?n] | ||
IS[kas=?k, num=?n] -> ize[azp=ber] knmdek[kas=?k, num=?n] | ||
|
||
IS[kas=?k, num=?n]/IS -> | ||
|
||
# AS erregelak | ||
AS[ergnum=?n1, absnum=?n2]/?x -> IS[kas=abs, num=?n1]/?x AS[ergnum=?n1, absnum=?n2] | ||
AS[ergnum=?n1, absnum=?n2] -> adi adl[ergnum=?n1, absnum=?n2] | ||
# ############################ | ||
# Lexicon | ||
# ############################ | ||
|
||
knmdek[kas=erg, num=hu] -> 'ak' | ||
knmdek[kas=erg, num=hk] -> 'ek' | ||
|
||
knmdek[kas=abs, num=hk] -> 'ak' | ||
knmdek[kas=abs, num=hu] -> 'a' | ||
|
||
ize[azp=arr] -> 'bizilagun' | 'aita' | 'gizon' | 'emakume' | ||
ize[azp=ber] -> 'Kepa' | 'Ainara' | ||
|
||
adi -> 'ekarri' | 'eraman' | 'puskatu' | 'lapurtu' | ||
|
||
adl[ergnum=hu, absnum=hu] -> 'du' | 'zuen' | ||
adl[ergnum=hk, absnum=hu] -> 'dute' | 'zuten' | ||
adl[ergnum=hu, absnum=hk] -> 'ditu' | 'zituen' | ||
adl[ergnum=hk, absnum=hk] -> 'dituzte' | 'zituzten' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
IS: | ||
{<.*>+} # Edozer Onartzen Duen Chunkerra | ||
}<ADI.*|ADL.*|ADT.*|PUNT.*|POST.*|LOT.*|ADB.*>+{ # Chink Bezala Barneratu Aditzak (ADI.*, ADT.* eta ADL.*), Adberbioak (ADB.*), Preposizioak (POST.*), Loturak (LOT.*) Eta Puntuazio Ikurrak (PUNT.*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
IS: {(<ADJ.*>*<DET.*>*<IZE.*>+<ADJ.*>*<DET.*>*)*} #noun phrase chunks | ||
AS: {(<ADI.*|ADL.*|ADT.*>*)+} # verb phrase chunks | ||
PS: {<POST.*>+} # prepositional phrase chunks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
IS: {(<ADJ.*>*<DET.*>*<IZE.*>*<ADJ.*>*<DET.*>*)*} #noun phrase chunks | ||
AS: {(<ADI.*|ADL.*|ADT.*>+)+<POST.*>*} # verb phrase chunks | ||
PS: {<POST.*>+} # prepositional phrase chunks | ||
S: {<IS><AS>} | ||
{<AS><IS>} # Chunk NP, VP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
## Natural Language Toolkit: drt.fcfg | ||
## | ||
## Author: Dan Garrette <[email protected]> | ||
## URL: <http://www.nltk.orgt> | ||
## For license information, see LICENSE.TXT | ||
|
||
% start S | ||
############################ | ||
# Grammar Rules | ||
############################# | ||
|
||
S[sem = <app(?subj,?vp)>] -> NP[num=?n,sem=?subj] VP[num=?n,sem=?vp] | ||
|
||
NP[num=?n,sem=<app(?det,?nom)> ] -> Det[num=?n,sem=?det] Nom[num=?n,sem=?nom] | ||
NP[loc=?l,num=?n,sem=?np] -> PropN[loc=?l,num=?n,sem=?np] | ||
|
||
Nom[num=?n,sem=?nom] -> N[num=?n,sem=?nom] | ||
Nom[num=?n,sem=<app(?pp,?nom)>] -> N[num=?n,sem=?nom] PP[sem=?pp] | ||
|
||
VP[num=?n,sem=?v] -> IV[num=?n,sem=?v] | ||
VP[num=?n,sem=<app(?v,?obj)>] -> TV[num=?n,sem=?v] NP[sem=?obj] | ||
|
||
############################# | ||
# Lexical Rules | ||
############################# | ||
|
||
PropN[-loc,num=sg,sem=<\P.(DRS([x],[Angus(x)])+P(x))>] -> 'Angus' | ||
PropN[-loc,num=sg,sem=<\P.(DRS([x],[Irene(x)])+P(x))>] -> 'Irene' | ||
PropN[-loc,num=sg,sem=<\P.(DRS([x],[John(x)])+P(x))>] -> 'John' | ||
PropN[-loc,num=sg,sem=<\P.(DRS([x],[Mary(x)])+P(x))>] -> 'Mary' | ||
PropN[-loc,num=sg,sem=<\P.(DRS([x],[Suzie(x)])+P(x))>] -> 'Suzie' | ||
PropN[-loc,num=sg,sem=<\P.(DRS([x],[Vincent(x)])+P(x))>] -> 'Vincent' | ||
PropN[-loc,num=sg,sem=<\P.(DRS([x],[Mia(x)])+P(x))>] -> 'Mia' | ||
PropN[-loc,num=sg,sem=<\P.(DRS([x],[Marsellus(x)])+P(x))>] -> 'Marsellus' | ||
PropN[-loc,num=sg,sem=<\P.(DRS([x],[Fido(x)])+P(x))>] -> 'Fido' | ||
PropN[+loc,num=sg,sem=<\P.(DRS([x],[Noosa(x)])+P(x))>] -> 'Noosa' | ||
PropN[-loc,num=sg,sem=<\P.(DRS([x],[PRO(x)])+P(x))>] -> 'he' | ||
PropN[-loc,num=sg,sem=<\P.(DRS([x],[PRO(x)])+P(x))>] -> 'she' | ||
PropN[-loc,num=sg,sem=<\P.(DRS([x],[PRO(x)])+P(x))>] -> 'it' | ||
|
||
Det[num=sg,sem=<\P Q.DRS([],[((DRS([x],[])+P(x)) implies Q(x))])>] -> 'every' | 'Every' | ||
Det[num=pl,sem=<\P Q.DRS([],[((DRS([x],[])+P(x)) implies Q(x))])>] -> 'all' | 'All' | ||
Det[sem=<\P Q.((DRS([x],[])+P(x))+Q(x))>] -> 'some' | 'Some' | ||
Det[num=sg,sem=<\P Q.((DRS([x],[])+P(x))+Q(x))>] -> 'a' | 'A' | ||
Det[num=sg,sem=<\P Q.(not ((DRS([x],[])+P(x))+Q(x)))>] -> 'no' | 'No' | ||
|
||
N[num=sg,sem=<\x.DRS([],[boy(x)])>] -> 'boy' | ||
N[num=pl,sem=<\x.DRS([],[boy(x)])>] -> 'boys' | ||
N[num=sg,sem=<\x.DRS([],[girl(x)])>] -> 'girl' | ||
N[num=pl,sem=<\x.DRS([],[girl(x)])>] -> 'girls' | ||
N[num=sg,sem=<\x.DRS([],[dog(x)])>] -> 'dog' | ||
N[num=pl,sem=<\x.DRS([],[dog(x)])>] -> 'dogs' | ||
N[num=sg,sem=<\x.DRS([],[student(x)])>] -> 'student' | ||
N[num=pl,sem=<\x.DRS([],[student(x)])>] -> 'students' | ||
N[num=sg,sem=<\x.DRS([],[person(x)])>] -> 'person' | ||
N[num=pl,sem=<\x.DRS([],[person(x)])>] -> 'persons' | ||
N[num=sg,sem=<\x.DRS([],[boxerdog(x)])>] -> 'boxer' | ||
N[num=pl,sem=<\x.DRS([],[boxerdog(x)])>] -> 'boxers' | ||
N[num=sg,sem=<\x.DRS([],[boxer(x)])>] -> 'boxer' | ||
N[num=pl,sem=<\x.DRS([],[boxer(x)])>] -> 'boxers' | ||
N[num=sg,sem=<\x.DRS([],[garden(x)])>] -> 'garden' | ||
N[num=sg,sem=<\x.DRS([],[kitchen(x)])>] -> 'kitchen' | ||
|
||
IV[num=sg,sem=<\x.DRS([],[bark(x)])>,tns=pres] -> 'barks' | ||
IV[num=pl,sem=<\x.DRS([],[bark(x)])>,tns=pres] -> 'bark' | ||
IV[num=sg,sem=<\x.DRS([],[walk(x)])>,tns=pres] -> 'walks' | ||
IV[num=pl,sem=<\x.DRS([],[walk(x)])>,tns=pres] -> 'walk' | ||
IV[num=pl,sem=<\x.DRS([],[dance(x)])>,tns=pres] -> 'dance' | ||
IV[num=sg,sem=<\x.DRS([],[dance(x)])>,tns=pres] -> 'dances' | ||
|
||
TV[num=sg,sem=<\X x. X(\y.DRS([],[own(x,y)]))>,tns=pres] -> 'owns' | ||
TV[num=pl,sem=<\X x. X(\y.DRS([],[own(x,y)]))>,tns=pres] -> 'own' | ||
TV[num=sg,sem=<\X x. X(\y.DRS([],[bite(x,y)]))>,tns=pres] -> 'bites' | ||
TV[num=pl,sem=<\X x. X(\y.DRS([],[bite(x,y)]))>,tns=pres] -> 'bite' | ||
TV[num=sg,sem=<\X x. X(\y.DRS([],[chase(x,y)]))>,tns=pres] -> 'chases' | ||
TV[num=pl,sem=<\X x. X(\y.DRS([],[chase(x,y)]))>,tns=pres] -> 'chase' | ||
TV[num=sg,sem=<\X x. X(\y.DRS([],[marry(x,y)]))>,tns=pres] -> 'marries' | ||
TV[num=pl,sem=<\X x. X(\y.DRS([],[marry(x,y)]))>,tns=pres] -> 'marry' | ||
TV[num=sg,sem=<\X x. X(\y.DRS([],[know(x,y)]))>,tns=pres] -> 'knows' | ||
TV[num=pl,sem=<\X x. X(\y.DRS([],[know(x,y)]))>,tns=pres] -> 'know' | ||
TV[num=sg,sem=<\X x. X(\y.DRS([],[see(x,y)]))>,tns=pres] -> 'sees' | ||
TV[num=pl,sem=<\X x. X(\y.DRS([],[see(x,y)]))>,tns=pres] -> 'see' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
## Natural Language Toolkit: feat0.fcfg | ||
## | ||
## First example of a feature-based grammar for English, illustrating | ||
## value-sharing of NUM and TENSE features. | ||
## Used in Feature-Based Grammars chapter. | ||
## | ||
## Author: Ewan Klein <[email protected]> | ||
## URL: <http://nltk.sourceforge.net> | ||
## For license information, see LICENSE.TXT | ||
## | ||
## $Id: feat0.cfg 4674 2007-06-14 08:55:32Z ehk $ | ||
|
||
% start S | ||
# ############################ | ||
# Grammar Rules | ||
# ############################ | ||
|
||
# S expansion rules | ||
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] | ||
|
||
# VP expansion rules | ||
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 -> 'the' | 'some' | ||
|
||
PropN[NUM=sg]-> 'Kim' | 'Jody' | ||
|
||
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=pl] -> 'disappear' | 'walk' | ||
TV[TENSE=pres, NUM=pl] -> 'see' | 'like' | ||
|
||
IV[TENSE=past, NUM=?n] -> 'disappeared' | 'walked' | ||
TV[TENSE=past, NUM=?n] -> 'saw' | 'liked' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
## Natural Language Toolkit: feat1.fcfg | ||
## | ||
## Second example of a feature-based grammar, illustrating | ||
## SUBCAT and slash features. Also introduces S-BAR and embedded | ||
## clauses. | ||
## Used in Feature-Based Grammars chapter. | ||
## | ||
## Author: Ewan Klein <[email protected]> | ||
## URL: <http://nltk.sourceforge.net> | ||
## For license information, see LICENSE.TXT | ||
## | ||
## $Id: feat1.cfg 4674 2007-06-14 08:55:32Z ehk $ | ||
|
||
% start S | ||
# ############################ | ||
# Grammar 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 | ||
|
||
NP/NP -> | ||
|
||
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' | ||
|
||
NP[-WH] -> 'you' | 'children' | 'girls' | ||
NP[+WH] -> 'who' | ||
|
||
Comp -> 'that' |
Oops, something went wrong.