forked from sipa/gramtropy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
english.gram
123 lines (101 loc) · 5.46 KB
/
english.gram
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
_ = " ";
quantity_vc_s = dict(one the);
quantity_vc_p = "the "? dict(two three four five many most several multiple) | dict(some no "a few");
quantity_v_s = quantity_vc_s | "an";
quantity_c_s = quantity_vc_s | "a";
quantity_v_p = quantity_vc_p;
quantity_c_p = quantity_vc_p;
c_value = dict(charming nice terrible horrible despicable beautiful
distasteful disgusting disasterous ridiculous good bad supreme
cute substandard poor deficient defective faulty miserable
crappy disagreeable worthless fine sound fit robust sturdy strong
weak superior satisfactory firm delightful notable famed great
known renowned marvelous superb neat worthy pleasing);
v_value = dict(awesome awful excellent exquisite ugly evil inferior unpleasant
imperfect unacceptable unsuitable unsatisfactory inadequate unwelcome
appropriate inappropriate enjoyable eminent exceptional);
value = c_value | v_value;
c_size = dict(big small large tiny tall short huge massive gargantuous humongous
microscopic spacious gigantic grand collosal monumental copious);
v_size = dict(enormous immense extensive immeasurable);
size = c_size | v_size;
c_temperature = dict(hot cold lukewarm scalding blazing frosty icy cool warm);
v_temperature = none;
temperature = c_temperature | v_temperature;
c_age = dict(new) | /[1-79]|1[0-79]|[2-79]\d/ "-year-old";
v_age = dict(young old ancient) | /8|18|8\d/ "-year-old";
age = c_age | v_age;
c_shape = dict(round square rectangular spherical curled cylindrical triangular pyramidal sharp twisted);
v_shape = dict(elliptical oval);
shape = c_shape | v_shape;
c_color = dict(red green blue yellow white black pink grey purple fuchsia brown
chestnut mahogany peach cerulean violet magenta maroon scarlet);
v_color = dict(indigo orange aquamarine);
color = c_color | v_color;
c_origin = dict(Chinese Victorian Japanese German Dutch French Spanish
Portugese Greek Swiss Canadian Scandinavian Danish Mexican
Russian Mongolian Welsh Scottish British Roman Czech
Turkish Polish Swedish Norwegian Finnish Macedonian Maltese
Brazilian Nigerian Thai Colombian Peruvian Nepalese Taiwanese
Syrian Belgian Cuban Haitian Bolivian Hungarian);
v_origin = dict(Italian Icelandic Indonesian Irish English American Ukrainian
Albanian Ethiopian Egyptian Argentinian Algerian Australian
Austrian Israelian);
origin = c_origin | v_origin;
c_material = dict(wooden glass silver bronze golden plastic leather metal ceramic stone diamond tin chrome);
v_material = none;
material = c_material | v_material;
c_noun_thing_s = dict(vase table chain shoe machine ball television carpet wire house lamp building pillar
book wall seat painting statue palace grave clock jacket door floor castle car train
bus bike);
v_noun_thing_s = dict(oven);
c_noun_thing_p = c_noun_thing_s "s";
v_noun_thing_p = v_noun_thing_s "s";
noun_thing_s = c_noun_thing_s | v_noun_thing_s;
noun_thing_p = c_noun_thing_p | v_noun_thing_p;
c_noun_actor_s = dict(boy girl human king queen worker doctor lawyer miner developer waiter coder
driver dentist butcher baker cook);
v_noun_actor_s = dict(engineer);
c_noun_actor_p = c_noun_actor_s "s";
v_noun_actor_p = v_noun_actor_s "s";
noun_actor_s = c_noun_actor_s | v_noun_actor_s;
noun_actor_p = c_noun_actor_p | v_noun_actor_p;
adj_thing_x1 = (material _)?;
adj_thing_x2 = (origin _)? adj_thing_x1;
adj_thing_x3 = (color _)? adj_thing_x2;
adj_thing_x4 = (shape _)? adj_thing_x3;
adj_thing_x5 = (age _)? adj_thing_x4;
adj_thing_x6 = (temperature _)? adj_thing_x5;
adj_thing_x7 = (size _)? adj_thing_x6;
adj_actor_x1 = (origin _)?;
adj_actor_x2 = (age _)? adj_actor_x1;
adj_actor_x3 = (size _)? adj_actor_x2;
c_adj_thing = c_value _ adj_thing_x7 | c_size _ adj_thing_x6 | c_temperature _ adj_thing_x5 |
c_age _ adj_thing_x4 | c_shape _ adj_thing_x3 | c_color _ adj_thing_x2 | c_origin _ adj_thing_x1 | c_material _;
v_adj_thing = v_value _ adj_thing_x7 | v_size _ adj_thing_x6 | v_temperature _ adj_thing_x5 |
v_age _ adj_thing_x4 | v_shape _ adj_thing_x3 | v_color _ adj_thing_x2 | v_origin _ adj_thing_x1 | v_material _;
c_adj_actor = c_value _ adj_actor_x3 | c_size _ adj_actor_x2 | c_age _ adj_actor_x1 | c_origin _;
v_adj_actor = v_value _ adj_actor_x3 | v_size _ adj_actor_x2 | v_age _ adj_actor_x1 | v_origin _;
nounadj_thing_s =
(quantity_c_s _ c_adj_thing | quantity_v_s _ v_adj_thing) noun_thing_s |
quantity_c_s _ c_noun_thing_s |
quantity_v_s _ v_noun_thing_s;
nounadj_actor_s =
(quantity_c_s _ c_adj_actor | quantity_v_s _ v_adj_actor) noun_actor_s |
quantity_c_s _ c_noun_actor_s |
quantity_v_s _ v_noun_actor_s;
nounadj_thing_p =
(quantity_c_p _ c_adj_thing | quantity_v_p _ v_adj_thing) noun_thing_p |
quantity_c_p _ c_noun_thing_p |
quantity_v_p _ v_noun_thing_p |
c_noun_thing_p |
v_noun_thing_p;
nounadj_actor_p =
(quantity_c_p _ c_adj_actor | quantity_v_p _ v_adj_actor) noun_actor_p |
quantity_c_p _ c_noun_actor_p |
quantity_v_p _ v_noun_actor_p |
c_noun_actor_p |
v_noun_actor_p;
verbs = dict(produce make destroy finish clean polish paint decorate open close analyze);
main = nounadj_actor_s _ verbs "s" _ (nounadj_thing_s | nounadj_thing_p) |
nounadj_actor_p _ verbs _ (nounadj_thing_s | nounadj_thing_p);