onvkv_seteyoposecetv 0.1.2 → 0.1.3
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a61180e12638ebb76484ad9ecca13737fd3174ec5abfe142607da265efe57591
|
|
4
|
+
data.tar.gz: c7744ef9db149efb34aad660ba369a7fe63e70dd3fcb777fd6f5cad56e70ccb2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 10dd12a5e0493c81f0b3011952f823c93276eeb12ce97071c226d4041240320becb79ec9eab3d043dd4870f0a7a7439c0aeddfd278e5db6e30a1fa29c706f68c
|
|
7
|
+
data.tar.gz: 36ff32778e3cf41d3f6be6fbe20c48ab8bb870a3635609a6b7b01cc9ae9b261a4068026c3b808b05738243db0ee939f806e1cc4bbc0a0a62f74f38fdafcb2f48
|
|
@@ -2,6 +2,12 @@ module Conjugators
|
|
|
2
2
|
module ActionVerbs
|
|
3
3
|
class PastOne
|
|
4
4
|
extend Conjugators::ActionVerbs::Shared
|
|
5
|
+
|
|
6
|
+
# Constants for diphthong patterns
|
|
7
|
+
UE_CK_PATTERN = /ue[ck]\z/.freeze # ue followed by c or k
|
|
8
|
+
UE_OTHER_PATTERN = /ue[^ck]\z/.freeze # ue followed by other consonants
|
|
9
|
+
VO_PATTERN = /vok\z/.freeze # vo followed by k
|
|
10
|
+
|
|
5
11
|
# SHORTEN, STRESS, ASPIRATE final vowel
|
|
6
12
|
def initialize(verb, irregular_pattern: nil)
|
|
7
13
|
@verb = verb
|
|
@@ -194,20 +200,31 @@ module Conjugators
|
|
|
194
200
|
end
|
|
195
201
|
|
|
196
202
|
def hgrade_final_vowel!
|
|
197
|
-
final_vowel_index = @verb_to_conjugate.rindex(/[aeēiov]/)
|
|
198
203
|
hgrade_form = identify_hgrade_form(@verb_to_conjugate)
|
|
199
204
|
|
|
200
|
-
|
|
201
|
-
|
|
205
|
+
case hgrade_form
|
|
206
|
+
when :ue_ck_diphthong
|
|
207
|
+
# -uec- or -uek- h-grades as -uehc- or -uehk-
|
|
208
|
+
if @verb_to_conjugate.end_with?('uec')
|
|
209
|
+
@verb_to_conjugate.sub!(/uec\z/, 'uehc')
|
|
210
|
+
else
|
|
211
|
+
@verb_to_conjugate.sub!(/uek\z/, 'uehk')
|
|
212
|
+
end
|
|
213
|
+
when :ue_other_diphthong
|
|
214
|
+
# -ue[^ck]- h-grades by changing 'ue' to 'uyi'
|
|
215
|
+
last_consonant = @verb_to_conjugate[-1]
|
|
216
|
+
@verb_to_conjugate.sub!(/ue[^ck]\z/, "uyi#{last_consonant}")
|
|
217
|
+
when :vo_diphthong
|
|
218
|
+
# -vok- h-grades as -vwik-
|
|
219
|
+
@verb_to_conjugate.sub!(/vok\z/, 'vwik')
|
|
220
|
+
when :basic
|
|
221
|
+
final_vowel_index = @verb_to_conjugate.rindex(/[aeēiov]/)
|
|
222
|
+
final_vowel = @verb_to_conjugate[final_vowel_index]
|
|
202
223
|
h_graded_final_vowel = self.class.basic_hgrades[final_vowel]
|
|
203
|
-
|
|
204
224
|
@verb_to_conjugate[final_vowel_index] = h_graded_final_vowel
|
|
205
|
-
|
|
206
|
-
elsif hgrade_form == :double_consonant
|
|
207
|
-
|
|
225
|
+
when :double_consonant
|
|
208
226
|
@verb_to_conjugate[-1] = 'iy' #e.g. kerr -> keriy
|
|
209
|
-
|
|
210
|
-
|
|
227
|
+
when :kk_or_consonant_cluster
|
|
211
228
|
@verb_to_conjugate[-1] = "i#{@verb_to_conjugate[-1]}" #e.g. homp -> homip
|
|
212
229
|
end
|
|
213
230
|
|
|
@@ -215,6 +232,11 @@ module Conjugators
|
|
|
215
232
|
end
|
|
216
233
|
|
|
217
234
|
def identify_hgrade_form(verb)
|
|
235
|
+
# First check for diphthong patterns
|
|
236
|
+
return :ue_ck_diphthong if verb.match?(UE_CK_PATTERN)
|
|
237
|
+
return :ue_other_diphthong if verb.match?(UE_OTHER_PATTERN)
|
|
238
|
+
return :vo_diphthong if verb.match?(VO_PATTERN)
|
|
239
|
+
|
|
218
240
|
final_vowel_index = verb.rindex(/[aeēiouv]/)
|
|
219
241
|
|
|
220
242
|
# what is to the right of that final vowel
|
|
@@ -137,7 +137,7 @@ module Conjugators
|
|
|
137
137
|
when"ē"
|
|
138
138
|
"ecē" + @verb[1..-1]
|
|
139
139
|
when "v"
|
|
140
|
-
"ece" + @verb
|
|
140
|
+
"ece" + @verb[1..-1]
|
|
141
141
|
when "o"
|
|
142
142
|
"ec" + @verb
|
|
143
143
|
when "e"
|
|
@@ -180,7 +180,7 @@ module Conjugators
|
|
|
180
180
|
when"ē"
|
|
181
181
|
"ecē" + verb[1..-1]
|
|
182
182
|
when "v"
|
|
183
|
-
"ece" + verb
|
|
183
|
+
"ece" + @verb[1..-1]
|
|
184
184
|
when "o"
|
|
185
185
|
"ec" + verb
|
|
186
186
|
when "e"
|