-
Notifications
You must be signed in to change notification settings - Fork 1
/
template.py
205 lines (145 loc) · 4.4 KB
/
template.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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
"""This is a template how declension models can be created.
"""
import dclua
import json
# Create declensions with one of the following template
noun = {
# Infinitive
(0, 0): '',
# Singular, nominative
(1, 0): '',
# Singular, genitive
(1, 1): '',
# Singular, dative
(1, 2): '',
# Singular, accusative
(1, 3): '',
# Singular, instrumental
(1, 4): '',
# Singular, locative
(1, 5): '',
# Singular, vocative
(1, 6): '',
# Plural, nominative
(2, 0): '',
# Plural, genitive
(2, 1): '',
# Plural, dative
(2, 2): '',
# Plural, accusative
(2, 3): '',
# Plural, instrumental
(2, 4): '',
# Plural, locative
(2, 5): '',
# Plural, vocative
(2, 6): ''
}
verb = {
# Infinitive
(0, 0, 0, 0): '',
# Verbs in present, first, singular has no gender, so push it to "neutral"
# Present, first, singular, neutral
(1, 0, 0, 2): '',
# Verbs in present, first, plural has no gender, so push it to "neutral"
# Present, first, plural, neutral
(1, 0, 1, 2): '',
# Verbs in present, second, singular has no gender, so push it to "neutral"
# Present, second, singular, neutral
(1, 1, 0, 2): '',
# Verbs in present, second, plural has no gender, so push it to "neutral"
# Present, second, plural, neutral
(1, 1, 1, 2): '',
# Verbs in present, third, singular has no gender, so push it to "neutral"
# Present, third, singular, neutral
(1, 2, 0, 2): '',
# Verbs in present, third, plural has no gender, so push it to "neutral"
# Present, third, plural, neutral
(1, 2, 1, 2): '',
# Verbs in future, first, singular has no gender, so push it to "neutral"
# Future, first, singular, neutral
(2, 0, 0, 2): '',
# Verbs in future, first, plural has no gender, so push it to "neutral"
# Future, first, plural, neutral
(2, 0, 1, 2): '',
# Verbs in future, second, singular has no gender, so push it to "neutral"
# Future, second, singular, neutral
(2, 1, 0, 2): '',
# Verbs in future, second, plural has no gender, so push it to "neutral"
# Future, second, plural, neutral
(2, 1, 1, 2): '',
# Verbs in future, third, singular has no gender, so push it to "neutral"
# Future, third, singular, neutral
(2, 2, 0, 2): '',
# Verbs in future, third, plural has no gender, so push it to "neutral"
# Future, third, plural, neutral
(2, 2, 1, 2): '',
# Verbs in past has no person, so push it to "first"
# Past, first, singular, masculine
(3, 0, 0, 0): '',
# Past, first, singular, feminine
(3, 0, 0, 1): '',
# Past, first, singular, neutral
(3, 0, 0, 2): '',
# Verbs in past, first, plural do not have gender, push it to "neutral".
# Past, first, plural, neutral
(3, 0, 1, 2): '',
}
adjective = {
# Infinitive
(0, 0, 0): '',
# Nominative, singular, masculine
(1, 0, 0): '',
# Nominative, singular, feminine
(1, 0, 1): '',
# Nominative, singular, neutral
(1, 0, 2): '',
# Genitive, singular, masculine
(2, 0, 0): '',
# Genitive, singular, feminine
(2, 0, 1): '',
# Genitive, singular, neutral
(2, 0, 2): '',
# Dative, singular, masculine
(3, 0, 0): '',
# Dative, singular, feminine
(3, 0, 1): '',
# Dative, singular, neutral
(3, 0, 2): '',
# Accusative, singular, masculine
(4, 0, 0): '',
# Accusative, singular, feminine
(4, 0, 1): '',
# Accusative, singular, neutral
(4, 0, 2): '',
# Instrumental, singular, masculine
(5, 0, 0): '',
# Instrumental, singular, feminine
(5, 0, 1): '',
# Instrumental, singular, neutral
(5, 0, 2): '',
# Locative, singular, masculine
(6, 0, 0): '',
# Locative, singular, feminine
(6, 0, 1): '',
# Locative, singular, neutral
(6, 0, 2): '',
# Adjectives in plural do not have gender, put it to `neutral`
# Nominative, plural, neutral
(1, 1, 0): '',
# Genitive, plural, neutral
(2, 1, 0): '',
# Dative, plural, neutral
(3, 1, 0): '',
# Accusative, plural, neutral
(4, 1, 0): '',
# Instrumental, plural, neutral
(5, 1, 0): '',
# Locative, plural, neutral
(6, 1, 0): ''
}
# Paste here your dict
with open(input("Enter the file to save in: ")) as fp:
fp.write(
json.dumps(
dclua.DeclenseTrainer(noun))) # Paste here your dict