87 lines
2.9 KiB
Plaintext
87 lines
2.9 KiB
Plaintext
|
|
## Natural Language Toolkit: german.fcfg
|
||
|
|
##
|
||
|
|
## Example of a feature-based grammar for German, illustrating
|
||
|
|
## CASE and AGR features (PER, GND, NUM) working as a bundle.
|
||
|
|
## Used in Feature-Based Grammars chapter.
|
||
|
|
##
|
||
|
|
## Author: Michaela Atterer <atterer@ims.uni-stuttgart.de>
|
||
|
|
## Ewan Klein <ewan@inf.ed.ac.uk>
|
||
|
|
##
|
||
|
|
## Plural transitive verbs productions by Jordan Boyd-Graber (ezubaric at users.sourceforge.net)
|
||
|
|
|
||
|
|
% start S
|
||
|
|
#####################
|
||
|
|
# Grammar Productions
|
||
|
|
#####################
|
||
|
|
S -> NP[CASE=nom, AGR=?a] VP[AGR=?a]
|
||
|
|
|
||
|
|
NP[CASE=?c, AGR=?a] -> PRO[CASE=?c, AGR=?a]
|
||
|
|
NP[CASE=?c, AGR=?a] -> Det[CASE=?c, AGR=?a] N[CASE=?c, AGR=?a]
|
||
|
|
|
||
|
|
VP[AGR=?a] -> IV[AGR=?a]
|
||
|
|
VP[AGR=?a] -> TV[OBJCASE=?c, AGR=?a] NP[CASE=?c]
|
||
|
|
|
||
|
|
#####################
|
||
|
|
# Lexical Productions
|
||
|
|
#####################
|
||
|
|
# Singular determiners
|
||
|
|
|
||
|
|
# masc
|
||
|
|
Det[CASE=nom, AGR=[GND=masc,PER=3,NUM=sg]] -> 'der'
|
||
|
|
Det[CASE=dat, AGR=[GND=masc,PER=3,NUM=sg]] -> 'dem'
|
||
|
|
Det[CASE=acc, AGR=[GND=masc,PER=3,NUM=sg]] -> 'den'
|
||
|
|
|
||
|
|
# fem
|
||
|
|
Det[CASE=nom, AGR=[GND=fem,PER=3,NUM=sg]] -> 'die'
|
||
|
|
Det[CASE=dat, AGR=[GND=fem,PER=3,NUM=sg]] -> 'der'
|
||
|
|
Det[CASE=acc, AGR=[GND=fem,PER=3,NUM=sg]] -> 'die'
|
||
|
|
|
||
|
|
# Plural determiners
|
||
|
|
Det[CASE=nom, AGR=[PER=3,NUM=pl]] -> 'die'
|
||
|
|
Det[CASE=dat, AGR=[PER=3,NUM=pl]] -> 'den'
|
||
|
|
Det[CASE=acc, AGR=[PER=3,NUM=pl]] -> 'die'
|
||
|
|
|
||
|
|
# Nouns
|
||
|
|
N[AGR=[GND=masc,PER=3,NUM=sg]] -> 'Hund'
|
||
|
|
N[CASE=nom, AGR=[GND=masc,PER=3,NUM=pl]] -> 'Hunde'
|
||
|
|
N[CASE=dat, AGR=[GND=masc,PER=3,NUM=pl]] -> 'Hunden'
|
||
|
|
N[CASE=acc, AGR=[GND=masc,PER=3,NUM=pl]] -> 'Hunde'
|
||
|
|
|
||
|
|
N[AGR=[GND=fem,PER=3,NUM=sg]] -> 'Katze'
|
||
|
|
N[AGR=[GND=fem,PER=3,NUM=pl]] -> 'Katzen'
|
||
|
|
|
||
|
|
# Pronouns
|
||
|
|
PRO[CASE=nom, AGR=[PER=1,NUM=sg]] -> 'ich'
|
||
|
|
PRO[CASE=acc, AGR=[PER=1,NUM=sg]] -> 'mich'
|
||
|
|
PRO[CASE=dat, AGR=[PER=1,NUM=sg]] -> 'mir'
|
||
|
|
PRO[CASE=nom, AGR=[PER=2,NUM=sg]] -> 'du'
|
||
|
|
PRO[CASE=nom, AGR=[PER=3,NUM=sg]] -> 'er' | 'sie' | 'es'
|
||
|
|
PRO[CASE=nom, AGR=[PER=1,NUM=pl]] -> 'wir'
|
||
|
|
PRO[CASE=acc, AGR=[PER=1,NUM=pl]] -> 'uns'
|
||
|
|
PRO[CASE=dat, AGR=[PER=1,NUM=pl]] -> 'uns'
|
||
|
|
PRO[CASE=nom, AGR=[PER=2,NUM=pl]] -> 'ihr'
|
||
|
|
PRO[CASE=nom, AGR=[PER=3,NUM=pl]] -> 'sie'
|
||
|
|
|
||
|
|
# Verbs
|
||
|
|
IV[AGR=[NUM=sg,PER=1]] -> 'komme'
|
||
|
|
IV[AGR=[NUM=sg,PER=2]] -> 'kommst'
|
||
|
|
IV[AGR=[NUM=sg,PER=3]] -> 'kommt'
|
||
|
|
IV[AGR=[NUM=pl, PER=1]] -> 'kommen'
|
||
|
|
IV[AGR=[NUM=pl, PER=2]] -> 'kommt'
|
||
|
|
IV[AGR=[NUM=pl, PER=3]] -> 'kommen'
|
||
|
|
|
||
|
|
TV[OBJCASE=acc, AGR=[NUM=sg,PER=1]] -> 'sehe' | 'mag'
|
||
|
|
TV[OBJCASE=acc, AGR=[NUM=sg,PER=2]] -> 'siehst' | 'magst'
|
||
|
|
TV[OBJCASE=acc, AGR=[NUM=sg,PER=3]] -> 'sieht' | 'mag'
|
||
|
|
TV[OBJCASE=dat, AGR=[NUM=sg,PER=1]] -> 'folge' | 'helfe'
|
||
|
|
TV[OBJCASE=dat, AGR=[NUM=sg,PER=2]] -> 'folgst' | 'hilfst'
|
||
|
|
TV[OBJCASE=dat, AGR=[NUM=sg,PER=3]] -> 'folgt' | 'hilft'
|
||
|
|
TV[OBJCASE=acc, AGR=[NUM=pl,PER=1]] -> 'sehen' | 'moegen'
|
||
|
|
TV[OBJCASE=acc, AGR=[NUM=pl,PER=2]] -> 'sieht' | 'moegt'
|
||
|
|
TV[OBJCASE=acc, AGR=[NUM=pl,PER=3]] -> 'sehen' | 'moegen'
|
||
|
|
TV[OBJCASE=dat, AGR=[NUM=pl,PER=1]] -> 'folgen' | 'helfen'
|
||
|
|
TV[OBJCASE=dat, AGR=[NUM=pl,PER=2]] -> 'folgt' | 'helft'
|
||
|
|
TV[OBJCASE=dat, AGR=[NUM=pl,PER=3]] -> 'folgen' | 'helfen'
|
||
|
|
|
||
|
|
|