-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMiniGrammar.gf
88 lines (71 loc) · 3.04 KB
/
MiniGrammar.gf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
abstract MiniGrammar = {
-- collected from GF/lib/src/abstract/*.gf
-- the functions marked ---s are shortcuts
cat
-- Common
Utt ; -- sentence, question, word... e.g. "be quiet"
Adv ; -- adverbial phrase e.g. "in the house"
Pol ; -- polarity e.g. positive, negative
-- Cat
S ; -- declarative sentence e.g. "she lives here"
Cl ; -- declarative clause, with all tenses e.g. "she looks at this"
VP ; -- verb phrase e.g. "lives here"
AP ; -- adjectival phrase e.g. "very warm"
CN ; -- common noun (without determiner) e.g. "red house"
NP ; -- noun phrase (subject or object) e.g. "the red house"
Pron ; -- personal pronoun e.g. "she"
Det ; -- determiner phrase e.g. "those"
Conj ; -- conjunction e.g. "and"
Prep ; -- preposition, or just case e.g. "in", dative
V ; -- one-place verb e.g. "sleep"
V2 ; -- two-place verb e.g. "love"
A ; -- one-place adjective e.g. "warm"
N ; -- common noun e.g. "house"
PN ; -- proper name e.g. "Paris"
fun
-- Phrase
UttS : S -> Utt ;
UttNP : NP -> Utt ;
-- Sentence
UsePresCl : Pol -> Cl -> S ; -- John does not walk ---s
PredVP : NP -> VP -> Cl ; -- John walks / John does not walk
-- Verb
UseV : V -> VP ; -- sleep
ComplV2 : V2 -> NP -> VP ; -- love it ---s
UseAP : AP -> VP ; -- be small ---s
AdvVP : VP -> Adv -> VP ; -- sleep here
-- Noun
DetCN : Det -> CN -> NP ; -- the man
UsePN : PN -> NP ; -- John
UsePron : Pron -> NP ; -- he
MassNP : CN -> NP ; -- milk
a_Det : Det ; -- indefinite singular ---s
aPl_Det : Det ; -- indefinite plural ---s
the_Det : Det ; -- definite singular ---s
thePl_Det : Det ; -- definite plural ---s
UseN : N -> CN ; -- house
AdjCN : AP -> CN -> CN ; -- big house
-- Adjective
PositA : A -> AP ; -- warm
-- Adverb
PrepNP : Prep -> NP -> Adv ; -- in the house
-- Conjunction
CoordS : Conj -> S -> S -> S ; -- he walks and she runs ---s
-- Tense
PPos : Pol ; -- I sleep [positive polarity]
PNeg : Pol ; -- I do not sleep [negative polarity]
-- Structural
and_Conj : Conj ;
or_Conj : Conj ;
every_Det : Det ;
in_Prep : Prep ;
on_Prep : Prep ;
with_Prep : Prep ;
i_Pron : Pron ;
youSg_Pron : Pron ;
he_Pron : Pron ;
she_Pron : Pron ;
we_Pron : Pron ;
youPl_Pron : Pron ;
they_Pron : Pron ;
}