-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrules.py
34 lines (34 loc) · 795 Bytes
/
rules.py
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
rules = {
"ROOT": [["S"]],
"S": [
["NP", "VP"],
["aux", "NP", "VP"],
["VP"]
],
"NP": [
["pronoun"],
["noun"],
["det", "NOMINAL"]
],
"NOMINAL": [
["noun"],
["NOMINAL", "noun"],
["NOMINAL", "PP"]
],
"VP": [
["verb"],
["verb", "NP"],
["verb", "NP", "PP"],
["verb", "PP"],
["VP", "PP"]
],
"PP": [
["prepos", "NP"]
],
"det": {"that", "this", "a"},
"noun": {"flight", "meal", "money", "gift", "astronomers", "stars", "ears", "world", "india", "me"},
"verb": {"book", "include", "prefer", "saw", "hello"},
"pronoun": {"i", "she", "me"},
"aux": {"does"},
"prepos": {"from", "to", "on", "near", "through", "with"}
}