llt-form_builder 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.rspec +3 -0
- data/.travis.yml +4 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +8 -0
- data/lib/llt/form/adjective.rb +19 -0
- data/lib/llt/form/adverb.rb +13 -0
- data/lib/llt/form/cardinal.rb +31 -0
- data/lib/llt/form/conjunction.rb +7 -0
- data/lib/llt/form/declinable.rb +23 -0
- data/lib/llt/form/demonstrative_pronoun.rb +7 -0
- data/lib/llt/form/ethnic.rb +6 -0
- data/lib/llt/form/fp.rb +6 -0
- data/lib/llt/form/gerund.rb +9 -0
- data/lib/llt/form/gerundive.rb +12 -0
- data/lib/llt/form/indefinite_pronoun.rb +7 -0
- data/lib/llt/form/infinitive.rb +13 -0
- data/lib/llt/form/interrogative_pronoun.rb +7 -0
- data/lib/llt/form/noun.rb +17 -0
- data/lib/llt/form/participle.rb +9 -0
- data/lib/llt/form/personal_pronoun.rb +13 -0
- data/lib/llt/form/ppa.rb +6 -0
- data/lib/llt/form/ppp.rb +6 -0
- data/lib/llt/form/preposition.rb +32 -0
- data/lib/llt/form/pronoun.rb +17 -0
- data/lib/llt/form/relative_pronoun.rb +7 -0
- data/lib/llt/form/subjunction.rb +7 -0
- data/lib/llt/form/supinum.rb +6 -0
- data/lib/llt/form/uninflectable.rb +22 -0
- data/lib/llt/form/verb.rb +28 -0
- data/lib/llt/form/verbal_noun.rb +18 -0
- data/lib/llt/form.rb +80 -0
- data/lib/llt/form_builder/adjective_builder.rb +86 -0
- data/lib/llt/form_builder/adverb_builder.rb +25 -0
- data/lib/llt/form_builder/declinable_builder.rb +164 -0
- data/lib/llt/form_builder/ethnic_builder.rb +17 -0
- data/lib/llt/form_builder/fp_builder.rb +13 -0
- data/lib/llt/form_builder/gerund_builder.rb +37 -0
- data/lib/llt/form_builder/gerundive_builder.rb +24 -0
- data/lib/llt/form_builder/helpers/adjective_like_building.rb +29 -0
- data/lib/llt/form_builder/helpers/pronoun_segments.rb +226 -0
- data/lib/llt/form_builder/helpers/stem_hash_parser.rb +263 -0
- data/lib/llt/form_builder/helpers/verb_segments.rb +562 -0
- data/lib/llt/form_builder/infinitivum_builder.rb +19 -0
- data/lib/llt/form_builder/irregular_gerund_builder.rb +7 -0
- data/lib/llt/form_builder/irregular_gerundive_builder.rb +7 -0
- data/lib/llt/form_builder/irregular_ppa_builder.rb +7 -0
- data/lib/llt/form_builder/irregular_praesens_builder.rb +5 -0
- data/lib/llt/form_builder/irregular_praesens_infinitivum_builder.rb +5 -0
- data/lib/llt/form_builder/noun_builder.rb +24 -0
- data/lib/llt/form_builder/perfectum_builder.rb +14 -0
- data/lib/llt/form_builder/perfectum_infinitivum_builder.rb +7 -0
- data/lib/llt/form_builder/personal_pronoun_builder.rb +107 -0
- data/lib/llt/form_builder/ppa_builder.rb +20 -0
- data/lib/llt/form_builder/ppp_builder.rb +10 -0
- data/lib/llt/form_builder/praesens_builder.rb +41 -0
- data/lib/llt/form_builder/praesens_infinitivum_builder.rb +9 -0
- data/lib/llt/form_builder/pronoun_builder.rb +106 -0
- data/lib/llt/form_builder/supinum_builder.rb +23 -0
- data/lib/llt/form_builder/verb_builder.rb +37 -0
- data/lib/llt/form_builder/version.rb +5 -0
- data/lib/llt/form_builder.rb +370 -0
- data/lib/llt/stem/adjective_pack.rb +122 -0
- data/lib/llt/stem/adjective_stem.rb +23 -0
- data/lib/llt/stem/ethnic_stem.rb +9 -0
- data/lib/llt/stem/noun_pack.rb +14 -0
- data/lib/llt/stem/noun_stem.rb +26 -0
- data/lib/llt/stem/pack.rb +46 -0
- data/lib/llt/stem/verb_pack.rb +53 -0
- data/lib/llt/stem/verb_stem.rb +18 -0
- data/lib/llt/stem.rb +145 -0
- data/lib/llt/stem_builder.rb +53 -0
- data/llt-form_builder.gemspec +30 -0
- data/spec/lib/llt/form/adjective_spec.rb +10 -0
- data/spec/lib/llt/form/adverb_spec.rb +17 -0
- data/spec/lib/llt/form/conjunction_spec.rb +23 -0
- data/spec/lib/llt/form/demonstrative_pronoun_spec.rb +14 -0
- data/spec/lib/llt/form/fp_spec.rb +12 -0
- data/spec/lib/llt/form/functions_spec.rb +13 -0
- data/spec/lib/llt/form/gerund_spec.rb +10 -0
- data/spec/lib/llt/form/gerundive_spec.rb +13 -0
- data/spec/lib/llt/form/noun_spec.rb +18 -0
- data/spec/lib/llt/form/ppa_spec.rb +12 -0
- data/spec/lib/llt/form/ppp_spec.rb +12 -0
- data/spec/lib/llt/form/preposition_spec.rb +43 -0
- data/spec/lib/llt/form/supinum_spec.rb +9 -0
- data/spec/lib/llt/form/verb_spec.rb +14 -0
- data/spec/lib/llt/form_builder/adjective_builder_spec.rb +182 -0
- data/spec/lib/llt/form_builder/adverb_builder_spec.rb +27 -0
- data/spec/lib/llt/form_builder/ethnic_builder_spec.rb +17 -0
- data/spec/lib/llt/form_builder/form_builder_spec.rb +16 -0
- data/spec/lib/llt/form_builder/fp_builder_spec.rb +42 -0
- data/spec/lib/llt/form_builder/gerund_builder_spec.rb +80 -0
- data/spec/lib/llt/form_builder/gerundive_builder_spec.rb +102 -0
- data/spec/lib/llt/form_builder/helpers/stem_hash_parser_spec.rb +197 -0
- data/spec/lib/llt/form_builder/irregular_gerund_builder_spec.rb +22 -0
- data/spec/lib/llt/form_builder/irregular_gerundive_builder_spec.rb +21 -0
- data/spec/lib/llt/form_builder/irregular_praesens_builder_spec.rb +14 -0
- data/spec/lib/llt/form_builder/irregular_praesens_infinitivum_builder_spec.rb +32 -0
- data/spec/lib/llt/form_builder/noun_builder_spec.rb +245 -0
- data/spec/lib/llt/form_builder/personal_pronoun_builder_spec.rb +49 -0
- data/spec/lib/llt/form_builder/ppa_builder_spec.rb +137 -0
- data/spec/lib/llt/form_builder/ppp_builder_spec.rb +45 -0
- data/spec/lib/llt/form_builder/pronoun_builder_spec.rb +203 -0
- data/spec/lib/llt/form_builder/supinum_builder_spec.rb +24 -0
- data/spec/lib/llt/form_builder/verb_builder_spec.rb +557 -0
- data/spec/lib/llt/form_spec.rb +27 -0
- data/spec/lib/llt/stem/adjective_pack_spec.rb +78 -0
- data/spec/lib/llt/stem/adjective_stem_spec.rb +15 -0
- data/spec/lib/llt/stem/noun_pack_spec.rb +20 -0
- data/spec/lib/llt/stem/noun_stem_spec.rb +14 -0
- data/spec/lib/llt/stem/verb_pack_spec.rb +56 -0
- data/spec/lib/llt/stem_builder_spec.rb +20 -0
- data/spec/spec_helper.rb +21 -0
- metadata +330 -0
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
module LLT
|
|
2
|
+
class FormBuilder
|
|
3
|
+
class VerbSegments
|
|
4
|
+
attr_reader :inflection_class, :modus
|
|
5
|
+
|
|
6
|
+
include Helpers::Initialize
|
|
7
|
+
include Helpers::Normalizer
|
|
8
|
+
extend Helpers::Normalizer
|
|
9
|
+
|
|
10
|
+
def self.get(method, args)
|
|
11
|
+
c = if temp = args[:tempus]
|
|
12
|
+
const_get("#{t.send(temp, :camelcase)}Segments")
|
|
13
|
+
else
|
|
14
|
+
PraesensSegments
|
|
15
|
+
end
|
|
16
|
+
c.new(args).send(method).to_s # to_s to capture all nil returns and give back an empty string
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def initialize(args)
|
|
20
|
+
extract_normalized_args!(args)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def init_keys
|
|
24
|
+
%i{ sexus casus modus inflection_class numerus persona ending genus }
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
private
|
|
28
|
+
|
|
29
|
+
#%w{ esse posse ferre ire velle nolle malle fieri edere }.each do |irreg|
|
|
30
|
+
# class_eval <<-STR
|
|
31
|
+
# def #{irreg}
|
|
32
|
+
# :#{irreg}
|
|
33
|
+
# end
|
|
34
|
+
# STR
|
|
35
|
+
#end
|
|
36
|
+
|
|
37
|
+
def a_or_e_conjugation
|
|
38
|
+
@inflection_class == 1 || @inflection_class == 2
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def c_or_m_conjugation
|
|
42
|
+
@inflection_class == 3 || @inflection_class == 5
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def first_sg
|
|
46
|
+
@persona == 1 && @numerus == 1
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def third_pl
|
|
50
|
+
@persona == 3 && @numerus == 2
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def special_thematic_for_i_conj
|
|
54
|
+
if third_pl
|
|
55
|
+
n(:THEMATIC_U)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
alias :thematic_indicativus_4 :special_thematic_for_i_conj
|
|
59
|
+
|
|
60
|
+
def n(arg)
|
|
61
|
+
LLT::Constants::Markers::Verb.const_get(arg)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def usual_thematic_vowels
|
|
65
|
+
case @ending
|
|
66
|
+
when /^[stm]/ then n(:THEMATIC_I)
|
|
67
|
+
when /^r/ then n(:THEMATIC_E)
|
|
68
|
+
when /^n/ then n(:THEMATIC_U)
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
alias :thematic_indicativus_3 :usual_thematic_vowels
|
|
72
|
+
|
|
73
|
+
def thematic
|
|
74
|
+
send("thematic_" + modus_term)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def modus_term
|
|
78
|
+
"#{t.send(@modus, :full)}"
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def stem_of_fieri
|
|
82
|
+
"fi"
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def stem_of_malle
|
|
86
|
+
"mal"
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def stem_of_nolle
|
|
90
|
+
"nol"
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def stem_of_ferre
|
|
94
|
+
"fer"
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
def stem
|
|
98
|
+
send("stem_of_#{@inflection_class}")
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
class PraesensSegments < VerbSegments
|
|
102
|
+
def extension
|
|
103
|
+
arr = %i{ esse velle nolle malle edere posse }
|
|
104
|
+
if @modus == t.coniunctivus
|
|
105
|
+
case @inflection_class
|
|
106
|
+
when 1
|
|
107
|
+
n(:PRAESENS_CONIUNCTIVUS_A)
|
|
108
|
+
when ->(x) { arr.include?(x) }
|
|
109
|
+
n(:PRAESENS_CONIUNCTIVUS_IRREGULAR)
|
|
110
|
+
else
|
|
111
|
+
n(:PRAESENS_CONIUNCTIVUS)
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
def stem_of_edere
|
|
117
|
+
case @modus
|
|
118
|
+
when t.indicativus then indicativus_stem_of_edere
|
|
119
|
+
when t.coniunctivus then "ed"
|
|
120
|
+
when t.imperativus then "es"
|
|
121
|
+
when t.infinitivum then "es"
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def indicativus_stem_of_edere
|
|
126
|
+
case [@persona, @numerus]
|
|
127
|
+
when [2, 1] then "es"
|
|
128
|
+
when [3, 1] then "es"
|
|
129
|
+
when [2, 2] then "es"
|
|
130
|
+
else "ed"
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
def stem_of_malle
|
|
136
|
+
case @modus
|
|
137
|
+
when t.indicativus then indicativus_stem_of_malle
|
|
138
|
+
when t.coniunctivus then "mal"
|
|
139
|
+
when t.infinitivum then "mal"
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
def indicativus_stem_of_malle
|
|
144
|
+
case [@persona, @numerus]
|
|
145
|
+
when [2, 1] then "mavi"
|
|
146
|
+
when [3, 1] then "mavul"
|
|
147
|
+
when [2, 2] then "mavul"
|
|
148
|
+
else "mal"
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
def stem_of_velle
|
|
153
|
+
case @modus
|
|
154
|
+
when t.indicativus then indicativus_stem_of_velle
|
|
155
|
+
when t.coniunctivus then "vel"
|
|
156
|
+
when t.infinitivum then "vel"
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
def indicativus_stem_of_velle
|
|
161
|
+
case [@persona, @numerus]
|
|
162
|
+
when [2, 1] then "vi"
|
|
163
|
+
when [3, 1] then "vul"
|
|
164
|
+
when [2, 2] then "vul"
|
|
165
|
+
else "vol"
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
def stem_of_ire
|
|
170
|
+
case @modus
|
|
171
|
+
when t.indicativus then indicativus_stem_of_ire
|
|
172
|
+
when t.coniunctivus then "e"
|
|
173
|
+
when t.imperativus then "i"
|
|
174
|
+
when t.infinitivum then "i"
|
|
175
|
+
when t.gerundium then "e"
|
|
176
|
+
when t.gerundivum then "e"
|
|
177
|
+
when t.participium then iens ? "i" : "e"
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
def iens
|
|
182
|
+
if @numerus == 1
|
|
183
|
+
@casus == 1 || @casus == 5 || ( @casus == 4 && @sexus == :n )
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
def indicativus_stem_of_ire
|
|
188
|
+
if third_pl || @persona == 1 && @numerus == 1
|
|
189
|
+
"e"
|
|
190
|
+
else
|
|
191
|
+
"i"
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
def stem_of_esse
|
|
196
|
+
case @modus
|
|
197
|
+
when t.indicativus then
|
|
198
|
+
if ( @numerus == 1 && @persona == 1 ) || ( @numerus == 2 && ( @persona == 1 || @persona == 3 ))
|
|
199
|
+
n(:STEM_ESSE_S)
|
|
200
|
+
else
|
|
201
|
+
n(:STEM_ESSE_ES)
|
|
202
|
+
end
|
|
203
|
+
when t.coniunctivus then n(:STEM_ESSE_S)
|
|
204
|
+
when t.imperativus then n(:STEM_ESSE_ES)
|
|
205
|
+
when t.infinitivum then n(:STEM_ESSE_ES)
|
|
206
|
+
when t.participium then n(:STEM_ESSE_E)
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
def stem_of_posse
|
|
211
|
+
if @modus == t.infinitivum
|
|
212
|
+
"po" + stem_of_esse[1..-1]
|
|
213
|
+
else
|
|
214
|
+
esse_stem = stem_of_esse
|
|
215
|
+
potis = esse_stem =~ /^s/ ? "pos" : "pot"
|
|
216
|
+
potis + esse_stem
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
private
|
|
221
|
+
|
|
222
|
+
def thematic_participium
|
|
223
|
+
if @inflection_class == 3 || @inflection_class == 4 || @inflection_class == :ferre
|
|
224
|
+
n(:THEMATIC_E)
|
|
225
|
+
elsif @inflection_class == 5
|
|
226
|
+
n(:THEMATIC_I) + n(:THEMATIC_E)
|
|
227
|
+
elsif @inflection_class == :ire
|
|
228
|
+
if iens
|
|
229
|
+
if @modus == t.gerundium || @modus == t.gerundivum
|
|
230
|
+
n(:THEMATIC_U)
|
|
231
|
+
else
|
|
232
|
+
n(:THEMATIC_E)
|
|
233
|
+
end
|
|
234
|
+
else
|
|
235
|
+
n(:THEMATIC_U)
|
|
236
|
+
end
|
|
237
|
+
else
|
|
238
|
+
""
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
alias :thematic_gerundivum :thematic_participium
|
|
242
|
+
alias :thematic_gerundium :thematic_participium
|
|
243
|
+
|
|
244
|
+
def thematic_coniunctivus
|
|
245
|
+
if @inflection_class == 5
|
|
246
|
+
n(:THEMATIC_I)
|
|
247
|
+
else
|
|
248
|
+
""
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
def thematic_infinitivum
|
|
253
|
+
if c_or_m_conjugation
|
|
254
|
+
usual_thematic_vowels
|
|
255
|
+
elsif @inflection_class == :fieri
|
|
256
|
+
n(:THEMATIC_E)
|
|
257
|
+
end
|
|
258
|
+
end
|
|
259
|
+
def thematic_indicativus
|
|
260
|
+
send("thematic_indicativus_" + "#{inflection_class}")
|
|
261
|
+
end
|
|
262
|
+
alias :thematic_imperativus :thematic_indicativus
|
|
263
|
+
|
|
264
|
+
def thematic_indicativus_esse
|
|
265
|
+
if @persona == 1 || third_pl
|
|
266
|
+
n(:THEMATIC_U)
|
|
267
|
+
else
|
|
268
|
+
""
|
|
269
|
+
end
|
|
270
|
+
end
|
|
271
|
+
alias :thematic_indicativus_posse :thematic_indicativus_esse
|
|
272
|
+
alias :thematic_indicativus_fieri :thematic_indicativus_esse
|
|
273
|
+
|
|
274
|
+
def thematic_indicativus_ferre
|
|
275
|
+
if (@persona == 1 && @numerus == 2) || (@persona == 2 && @numerus == 2 && @genus == t.pass)
|
|
276
|
+
n(:THEMATIC_I)
|
|
277
|
+
elsif third_pl
|
|
278
|
+
n(:THEMATIC_U)
|
|
279
|
+
else
|
|
280
|
+
""
|
|
281
|
+
end
|
|
282
|
+
end
|
|
283
|
+
alias :thematic_indicativus_edere :thematic_indicativus_ferre
|
|
284
|
+
|
|
285
|
+
def thematic_indicativus_velle
|
|
286
|
+
if @persona == 1 && @numerus == 2
|
|
287
|
+
n(:THEMATIC_U)
|
|
288
|
+
elsif third_pl
|
|
289
|
+
n(:THEMATIC_U)
|
|
290
|
+
else
|
|
291
|
+
""
|
|
292
|
+
end
|
|
293
|
+
end
|
|
294
|
+
alias :thematic_indicativus_nolle :thematic_indicativus_velle
|
|
295
|
+
alias :thematic_indicativus_malle :thematic_indicativus_velle
|
|
296
|
+
|
|
297
|
+
def thematic_indicativus_ire
|
|
298
|
+
if third_pl
|
|
299
|
+
n(:THEMATIC_U)
|
|
300
|
+
else
|
|
301
|
+
""
|
|
302
|
+
end
|
|
303
|
+
end
|
|
304
|
+
alias :thematic_indicativus_fieri :thematic_indicativus_ire
|
|
305
|
+
|
|
306
|
+
def thematic_indicativus_1
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
def thematic_indicativus_2
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
def thematic_indicativus_5
|
|
313
|
+
if @ending =~ /^o/
|
|
314
|
+
n(:THEMATIC_I)
|
|
315
|
+
elsif third_pl
|
|
316
|
+
n(:THEMATIC_I) + n(:THEMATIC_U)
|
|
317
|
+
else
|
|
318
|
+
usual_thematic_vowels
|
|
319
|
+
end
|
|
320
|
+
end
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
class ImperfectumSegments < VerbSegments
|
|
324
|
+
def stem_of_esse
|
|
325
|
+
case @modus
|
|
326
|
+
when t.indicativus then "er"
|
|
327
|
+
when t.coniunctivus then n(:STEM_ESSE_ES)
|
|
328
|
+
end
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
def stem_of_edere
|
|
332
|
+
case @modus
|
|
333
|
+
when t.indicativus then "ed"
|
|
334
|
+
when t.coniunctivus then "es"
|
|
335
|
+
end
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
def stem_of_posse
|
|
339
|
+
case @modus
|
|
340
|
+
when t.indicativus then "pot" + stem_of_esse
|
|
341
|
+
when t.coniunctivus then "po" + stem_of_esse[1..-1]
|
|
342
|
+
end
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
def stem_of_velle
|
|
346
|
+
if @modus == t.indicativus
|
|
347
|
+
"vol"
|
|
348
|
+
else
|
|
349
|
+
"vel"
|
|
350
|
+
end
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
def stem_of_ire
|
|
354
|
+
"i"
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
def extension
|
|
358
|
+
send("extension_" + modus_term)
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
private
|
|
362
|
+
|
|
363
|
+
def extension_coniunctivus
|
|
364
|
+
case @inflection_class
|
|
365
|
+
when ->(x) { %i{ esse posse edere }.include?(x) } then n(:IMPERFECTUM_CONIUNCTIVUS_SE)
|
|
366
|
+
when ->(x) { %i{ velle nolle malle }.include?(x) } then n(:IMPERFECTUM_CONIUNCTIVUS_LE)
|
|
367
|
+
else
|
|
368
|
+
n(:IMPERFECTUM_CONIUNCTIVUS)
|
|
369
|
+
end
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
def extension_indicativus
|
|
373
|
+
case @inflection_class
|
|
374
|
+
when :esse then n(:IMPERFECTUM_INDICATIVUS_ESSE)
|
|
375
|
+
when :posse then n(:IMPERFECTUM_INDICATIVUS_ESSE)
|
|
376
|
+
else
|
|
377
|
+
n(:IMPERFECTUM_INDICATIVUS) #ba
|
|
378
|
+
end
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
def thematic_coniunctivus
|
|
382
|
+
if c_or_m_conjugation || @inflection_class == :fieri
|
|
383
|
+
n(:THEMATIC_E)
|
|
384
|
+
else
|
|
385
|
+
""
|
|
386
|
+
end
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
def thematic_indicativus
|
|
390
|
+
arr = %i{ edere ferre velle nolle malle fieri }
|
|
391
|
+
|
|
392
|
+
case @inflection_class
|
|
393
|
+
when 5 then n(:THEMATIC_I) + n(:THEMATIC_E)
|
|
394
|
+
when 3 then n(:THEMATIC_E)
|
|
395
|
+
when 4 then n(:THEMATIC_E)
|
|
396
|
+
when ->(x) { arr.include?(x) } then n(:THEMATIC_E)
|
|
397
|
+
end
|
|
398
|
+
end
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
class PerfectStemSegments < VerbSegments
|
|
402
|
+
def thematic
|
|
403
|
+
""
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
def stem_of_ferre
|
|
407
|
+
"tul"
|
|
408
|
+
end
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
class PerfectumSegments < PerfectStemSegments
|
|
412
|
+
def extension
|
|
413
|
+
if @modus == t.coniunctivus
|
|
414
|
+
n(:PERFECTUM_SUFFIX_1) + n(:PERFECTUM_CONIUNCTIVUS)
|
|
415
|
+
else
|
|
416
|
+
""
|
|
417
|
+
end
|
|
418
|
+
end
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
class PlusquamperfectumSegments < PerfectStemSegments
|
|
422
|
+
def extension
|
|
423
|
+
if @modus == t.indicativus
|
|
424
|
+
n(:PERFECTUM_SUFFIX_1) + n(:PLUSQUAMPERFECTUM_INDICATIVUS)
|
|
425
|
+
else
|
|
426
|
+
n(:PERFECTUM_SUFFIX_2) + n(:PLUSQUAMPERFECTUM_CONIUNCTIVUS)
|
|
427
|
+
end
|
|
428
|
+
end
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
class FuturumSegments < VerbSegments
|
|
432
|
+
def stem_of_velle
|
|
433
|
+
"vol"
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
def stem_of_edere
|
|
437
|
+
case @modus
|
|
438
|
+
when t.indicativus then "ed"
|
|
439
|
+
when t.imperativus then edere_fut_imps
|
|
440
|
+
end
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
def stem_of_esse
|
|
444
|
+
case @modus
|
|
445
|
+
when t.indicativus then "er"
|
|
446
|
+
when t.imperativus then esse_fut_imps
|
|
447
|
+
end
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
def stem_of_posse
|
|
451
|
+
"pot" + stem_of_esse
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
def stem_of_ire
|
|
455
|
+
if @modus == t.imperativus
|
|
456
|
+
if third_pl
|
|
457
|
+
"e"
|
|
458
|
+
end
|
|
459
|
+
else
|
|
460
|
+
"i"
|
|
461
|
+
end
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
def edere_fut_imps
|
|
465
|
+
if third_pl
|
|
466
|
+
"ed"
|
|
467
|
+
else
|
|
468
|
+
"es"
|
|
469
|
+
end
|
|
470
|
+
end
|
|
471
|
+
|
|
472
|
+
def esse_fut_imps
|
|
473
|
+
if third_pl
|
|
474
|
+
n(:STEM_ESSE_S)
|
|
475
|
+
else
|
|
476
|
+
n(:STEM_ESSE_ES)
|
|
477
|
+
end
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
def extension
|
|
481
|
+
if @modus == t.indicativus
|
|
482
|
+
futurum_sign
|
|
483
|
+
else
|
|
484
|
+
""
|
|
485
|
+
end
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
private
|
|
489
|
+
|
|
490
|
+
def thematic_imperativus
|
|
491
|
+
#refactor pending
|
|
492
|
+
case @inflection_class
|
|
493
|
+
when 1..2 then ""
|
|
494
|
+
when 4 then special_thematic_for_i_conj
|
|
495
|
+
when 3 then usual_thematic_vowels
|
|
496
|
+
when 5 then thematic_imperativus_5
|
|
497
|
+
else thematic_imperativus_esse # esse ferre edere fieri nolle ire
|
|
498
|
+
end
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
def thematic_imperativus_5
|
|
502
|
+
if third_pl
|
|
503
|
+
n(:THEMATIC_I) + n(:THEMATIC_U)
|
|
504
|
+
else
|
|
505
|
+
usual_thematic_vowels
|
|
506
|
+
end
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
def thematic_imperativus_esse
|
|
510
|
+
if third_pl
|
|
511
|
+
n(:THEMATIC_U)
|
|
512
|
+
else
|
|
513
|
+
""
|
|
514
|
+
end
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
def futurum_sign
|
|
518
|
+
if a_or_e_conjugation || @inflection_class == :ire
|
|
519
|
+
n(:FUTURUM_A)
|
|
520
|
+
elsif @inflection_class == :esse || @inflection_class == :posse
|
|
521
|
+
""
|
|
522
|
+
else
|
|
523
|
+
futurm_signs_c
|
|
524
|
+
end
|
|
525
|
+
end
|
|
526
|
+
|
|
527
|
+
def futurm_signs_c
|
|
528
|
+
if first_sg
|
|
529
|
+
n(:FUTURUM_C_1)
|
|
530
|
+
else
|
|
531
|
+
n(:FUTURUM_C)
|
|
532
|
+
end
|
|
533
|
+
end
|
|
534
|
+
|
|
535
|
+
def thematic_indicativus
|
|
536
|
+
case @inflection_class
|
|
537
|
+
when 1 then usual_thematic_vowels
|
|
538
|
+
when 2 then usual_thematic_vowels
|
|
539
|
+
when 5 then n(:THEMATIC_I)
|
|
540
|
+
when :esse then usual_thematic_vowels
|
|
541
|
+
when :posse then usual_thematic_vowels
|
|
542
|
+
when :ire then usual_thematic_vowels
|
|
543
|
+
end
|
|
544
|
+
end
|
|
545
|
+
end
|
|
546
|
+
|
|
547
|
+
class FuturumExactumSegments < PerfectStemSegments
|
|
548
|
+
def thematic
|
|
549
|
+
""
|
|
550
|
+
end
|
|
551
|
+
|
|
552
|
+
def extension
|
|
553
|
+
if first_sg
|
|
554
|
+
n(:PERFECTUM_SUFFIX_1)
|
|
555
|
+
else
|
|
556
|
+
n(:PERFECTUM_SUFFIX_1) + n(:FUTURUM_EXACTUM_INDICATIVUS)
|
|
557
|
+
end
|
|
558
|
+
end
|
|
559
|
+
end
|
|
560
|
+
end
|
|
561
|
+
end
|
|
562
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module LLT
|
|
2
|
+
class InfinitivumBuilder < VerbBuilder
|
|
3
|
+
builds_with :modus
|
|
4
|
+
has_modus t.inf
|
|
5
|
+
|
|
6
|
+
form_class :infinitive
|
|
7
|
+
|
|
8
|
+
look_up :thematic
|
|
9
|
+
|
|
10
|
+
def indices
|
|
11
|
+
{ genus: (@deponens ? [1] : [0,1]) }
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def new_form_through_index(ending, i)
|
|
15
|
+
g, t = attributes_by_index(i)
|
|
16
|
+
new_form(ending: ending, genus: g, tempus: t, index: i)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module LLT
|
|
2
|
+
class NounBuilder < DeclinableBuilder
|
|
3
|
+
builds_with :sexus, :persona, :place
|
|
4
|
+
endings_defined_through :inflection_class, :sexus
|
|
5
|
+
|
|
6
|
+
attr_reader :persona, :place
|
|
7
|
+
|
|
8
|
+
def init_keys
|
|
9
|
+
super + %i{ persona place }
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def stays_capitalized
|
|
13
|
+
@persona || @place
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def nominatives
|
|
17
|
+
[[@nom, 1, 1]]
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def er_nominative_possible?
|
|
21
|
+
@inflection_class == 2 && ! o_declension_on_ius? # fili has no ending as well!
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module LLT
|
|
2
|
+
class PerfectumBuilder < VerbBuilder
|
|
3
|
+
look_up :thematic, :extension # investigate why this is needed an not handled through inheritance
|
|
4
|
+
|
|
5
|
+
def indices
|
|
6
|
+
{ persona: persona_index,
|
|
7
|
+
numerus: [0, 3],
|
|
8
|
+
genus: [0],
|
|
9
|
+
modus: [0, 6],
|
|
10
|
+
tempus: [nil, nil, nil, 0, 12, 24],
|
|
11
|
+
}
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|