onvkv_seteyoposecetv 0.1.2 → 0.1.4

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: 0dda8cbef0af2fb3f15792ed13551e79ac02bbae9d0225f74b8442bdeb2af546
4
- data.tar.gz: '08fa22a2cfaf673c49d9abd20c85c5b1cddc8f49f192b62d914e0af1007612bb'
3
+ metadata.gz: 3dcc530f6628d1107ea33b5dc39a4ab64ae23b04770556940cfe3c31917938ab
4
+ data.tar.gz: 354ad7126277dd54b7b7fc8104699eea079781eacd9b8e60424fe2b6290d3eb1
5
5
  SHA512:
6
- metadata.gz: cc097c974d24f26e2187d6ae747f1477bc040b22cc01aeeed4068053bdc0eeeb5f99e95871a3797d2eec7184aa8a28ae380adffe5f96ac98dcddc4e4fa553375
7
- data.tar.gz: 1a00bada3a095f6a435e85a0cded4bcba3dd94929ef21ef1e7085d1e039153429e0c334afcc95cb10b67a16cc053eb07969530c26a8a6171ac19b18eafa082fc
6
+ metadata.gz: 267287682244eb648d089e1c51f475b0b0cc6ddf21c6cc226de586e536ba6b7ebb37a1bb5434312e2e6c2646ac8aa9ce62c5388300cc40b6d39766c726932071
7
+ data.tar.gz: 37f6af79a9cb3fbc0f321f9b9d76edcf1984ea33ca9bc5a3af25ff6d4a75135cfa658e4eb1ca143ffdde3ac54563f99997feb66144a8a6b8af7c7bbef565fd8e
@@ -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
- if hgrade_form == :basic
201
- final_vowel = @verb_to_conjugate[final_vowel_index]
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
- elsif hgrade_form == :kk_or_consonant_cluster
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
@@ -78,22 +78,22 @@ module Conjugators
78
78
  return "N/A" if @verb == "ometv" || @verb == "owetv"
79
79
  result = send(tense)
80
80
  if result[0].is_a?(String)
81
- [result.map {|r| r + " towemvts" }]
81
+ [result.map {|r| r + "t owemvts" }]
82
82
  else
83
83
  if @irregular
84
84
  case result.size
85
85
  when 1
86
- rr_2plus = result[0].map {|r| "#{r} towemvts (of 2+)" }
86
+ rr_2plus = result[0].map {|r| "#{r}t owemvts (of 2+)" }
87
87
  [rr_2plus]
88
88
  when 2
89
- rr2 = result[0].map {|r| "#{r} towemvts (of 2)" }
90
- rr3_plus = result[1].map {|r| "#{r} towemvts (of 3+)"}
89
+ rr2 = result[0].map {|r| "#{r}t owemvts (of 2)" }
90
+ rr3_plus = result[1].map {|r| "#{r}t owemvts (of 3+)"}
91
91
  [rr2, rr3_plus]
92
92
  end
93
93
  else
94
94
  result.map do |verb_form|
95
95
  verb_form.map do |dialectic_option|
96
- "#{dialectic_option} towemvts"
96
+ "#{dialectic_option}t owemvts"
97
97
  end
98
98
  end
99
99
  end
@@ -111,10 +111,10 @@ module Conjugators
111
111
  @verb
112
112
  end
113
113
  results = if verbs_to_conjugate.is_a?(String)
114
- [result.map {|r| verbs_to_conjugate.gsub(/etv\z/, 'e ') + r }]
114
+ [result.map {|r| verbs_to_conjugate.gsub(/etv\z/, 'et ') + r }]
115
115
  else
116
116
  verbs_to_conjugate.map do |verb_to_conjugate|
117
- result.map {|r| verb_to_conjugate.gsub(/etv\z/, 'e ') + r }
117
+ result.map {|r| verb_to_conjugate.gsub(/etv\z/, 'et ') + r }
118
118
  end
119
119
  end
120
120
  if verbs_to_conjugate == @verb
@@ -78,22 +78,22 @@ module Conjugators
78
78
  return "N/A" if @verb == "ometv" || @verb == "owetv"
79
79
  result = send(tense)
80
80
  if result[0].is_a?(String)
81
- [result.map {|r| r + " towvnks" }]
81
+ [result.map {|r| r + "t owvnks" }]
82
82
  else
83
83
  if @irregular
84
84
  case result.size
85
85
  when 1
86
- rr_2plus = result[0].map {|r| "#{r} towvnks (of 2+)" }
86
+ rr_2plus = result[0].map {|r| "#{r}t owvnks (of 2+)" }
87
87
  [rr_2plus]
88
88
  when 2
89
- rr2 = result[0].map {|r| "#{r} towvnks (of 2)" }
90
- rr3_plus = result[1].map {|r| "#{r} towvnks (of 3+)"}
89
+ rr2 = result[0].map {|r| "#{r}t owvnks (of 2)" }
90
+ rr3_plus = result[1].map {|r| "#{r}t owvnks (of 3+)"}
91
91
  [rr2, rr3_plus]
92
92
  end
93
93
  else
94
94
  result.map do |verb_form|
95
95
  verb_form.map do |dialectic_option|
96
- "#{dialectic_option} towvnks"
96
+ "#{dialectic_option}t owvnks"
97
97
  end
98
98
  end
99
99
  end
@@ -111,10 +111,10 @@ module Conjugators
111
111
  @verb
112
112
  end
113
113
  results = if verbs_to_conjugate.is_a?(String)
114
- [result.map {|r| verbs_to_conjugate.gsub(/etv\z/, 'e ') + r }]
114
+ [result.map {|r| verbs_to_conjugate.gsub(/etv\z/, 'et ') + r }]
115
115
  else
116
116
  verbs_to_conjugate.map do |verb_to_conjugate|
117
- result.map {|r| verb_to_conjugate.gsub(/etv\z/, 'e ') + r }
117
+ result.map {|r| verb_to_conjugate.gsub(/etv\z/, 'et ') + r }
118
118
  end
119
119
  end
120
120
  if verbs_to_conjugate == @verb
@@ -2,7 +2,7 @@ module Conjugators
2
2
  module ActionVerbs
3
3
  class PresentTense
4
4
  NA ="N/A".freeze
5
- OMETV_REGEX = /o[mw]etv/.freeze
5
+ OMETV_REGEX = /^o[mw]etv/.freeze
6
6
  ETV_REGEX = /etv$/.freeze
7
7
  S = ?s.freeze
8
8
  ETV = "etv".freeze
@@ -22,8 +22,8 @@ module Conjugators
22
22
  I_ENDING_REGEX = /i$/.freeze
23
23
  Ē = 'ē'.freeze
24
24
  IYĒ = 'iyē'.freeze
25
- E_SPACE = 'e '.freeze
26
- SPACE_TOS = ' tos'.freeze
25
+ E_SPACE = 'et '.freeze
26
+ SPACE_TOS = 't os'.freeze
27
27
 
28
28
  extend Conjugators::ActionVerbs::Shared
29
29
  # Note, MVSKOKE language here
@@ -44,9 +44,20 @@ module Conjugators
44
44
  :conjugate_2ps => { basic_present: [NA], basic_durative: [NA], tos_auxiliary: [NA], ometv_conjugated_auxiliary: [NA] },
45
45
  :conjugate_1pp => { basic_present: [NA], basic_durative: [NA], tos_auxiliary: [NA], ometv_conjugated_auxiliary: [NA] },
46
46
  :conjugate_2pp => { basic_present: [NA], basic_durative: [NA], tos_auxiliary: [NA], ometv_conjugated_auxiliary: [NA] },
47
- #:conjugate_3ps => { basic_present: [NA], basic_durative: [NA], ometv_conjugated_auxiliary: [NA] },
48
47
  :conjugate_3pp => { basic_present: [NA], basic_durative: [NA], ometv_conjugated_auxiliary: [NA] },
49
- }
48
+ },
49
+ "mometv" => {
50
+ :conjugate_1ps => { basic_present: [NA], basic_durative: [NA], tos_auxiliary: [NA], ometv_conjugated_auxiliary: [NA] },
51
+ :conjugate_2ps => { basic_present: [NA], basic_durative: [NA], tos_auxiliary: [NA], ometv_conjugated_auxiliary: [NA] },
52
+ :conjugate_1pp => { basic_present: [NA], basic_durative: [NA], tos_auxiliary: [NA], ometv_conjugated_auxiliary: [NA] },
53
+ :conjugate_2pp => { basic_present: [NA], basic_durative: [NA], tos_auxiliary: [NA], ometv_conjugated_auxiliary: [NA] },
54
+ },
55
+ "mowetv" => {
56
+ :conjugate_1ps => { basic_present: [NA], basic_durative: [NA], tos_auxiliary: [NA], ometv_conjugated_auxiliary: [NA] },
57
+ :conjugate_2ps => { basic_present: [NA], basic_durative: [NA], tos_auxiliary: [NA], ometv_conjugated_auxiliary: [NA] },
58
+ :conjugate_1pp => { basic_present: [NA], basic_durative: [NA], tos_auxiliary: [NA], ometv_conjugated_auxiliary: [NA] },
59
+ :conjugate_2pp => { basic_present: [NA], basic_durative: [NA], tos_auxiliary: [NA], ometv_conjugated_auxiliary: [NA] },
60
+ },
50
61
  }
51
62
  end
52
63
 
@@ -134,17 +145,17 @@ module Conjugators
134
145
  if @irregular
135
146
  case result.size
136
147
  when 1
137
- rr_2plus = result[0].map {|r| "#{r} tos (of 2+)" }
148
+ rr_2plus = result[0].map {|r| "#{r}t os (of 2+)" }
138
149
  [rr_2plus]
139
150
  when 2
140
- rr2 = result[0].map {|r| "#{r} tos (of 2)" }
141
- rr3_plus = result[1].map {|r| "#{r} tos (of 3+)"}
151
+ rr2 = result[0].map {|r| "#{r}t os (of 2)" }
152
+ rr3_plus = result[1].map {|r| "#{r}t os (of 3+)"}
142
153
  [rr2, rr3_plus]
143
154
  end
144
155
  else
145
156
  result.map do |verb_form|
146
157
  verb_form.map do |dialectic_option|
147
- "#{dialectic_option} tos"
158
+ "#{dialectic_option}t os"
148
159
  end
149
160
  end
150
161
  end
@@ -229,7 +240,7 @@ module Conjugators
229
240
  drop_the_etv!
230
241
  lgrade_final_vowel!
231
242
 
232
- if @type == :tos_auxiliary
243
+ if @type == :tos_auxiliary || @type == :basic_durative
233
244
  @verb_to_conjugate + 'eyē'
234
245
  else
235
246
  add_person_marker!(person_marker)
@@ -242,7 +253,7 @@ module Conjugators
242
253
  @verb_to_conjugate = @verb.dup
243
254
  drop_the_etv!
244
255
  lgrade_final_vowel!
245
- if @type == :tos_auxiliary
256
+ if @type == :tos_auxiliary || @type == :basic_durative
246
257
  @verb_to_conjugate + 'eyē'
247
258
  else
248
259
  add_person_marker!(person_marker)
@@ -7,12 +7,12 @@ module Conjugators
7
7
 
8
8
  def self.person_conjugations
9
9
  {
10
- '1ps' => %w{towimvts},
11
- '2ps' => %w{towetskemvts toweckemvts toweccemvts towetcemvts },
12
- '3ps' => %w{towemvts},
13
- '1pp' => %w{towēyemvts},
14
- '2pp' => %w{towatskemvts towackemvts},
15
- '3pp' => %w{towakemvts}
10
+ '1ps' => %w{owimvts},
11
+ '2ps' => %w{owetskemvts oweckemvts oweccemvts owetcemvts },
12
+ '3ps' => %w{owemvts},
13
+ '1pp' => %w{owēyemvts},
14
+ '2pp' => %w{owatskemvts owackemvts},
15
+ '3pp' => %w{owakemvts}
16
16
  }
17
17
  end
18
18
 
@@ -7,12 +7,12 @@ module Conjugators
7
7
 
8
8
  def self.person_conjugations
9
9
  {
10
- '1ps' => %w{towivnks},
11
- '2ps' => %w{towetskvnks toweckvnks toweccvnks towetcvnks },
12
- '3ps' => %w{towvnks},
13
- '1pp' => %w{towēyvnks},
14
- '2pp' => %w{towatskvnks towackvnks},
15
- '3pp' => %w{towakvnks}
10
+ '1ps' => %w{owivnks},
11
+ '2ps' => %w{owetskvnks oweckvnks oweccvnks owetcvnks },
12
+ '3ps' => %w{owvnks},
13
+ '1pp' => %w{owēyvnks},
14
+ '2pp' => %w{owatskvnks owackvnks},
15
+ '3pp' => %w{owakvnks}
16
16
  }
17
17
  end
18
18
 
@@ -7,12 +7,12 @@ module Conjugators
7
7
 
8
8
  def self.person_conjugations
9
9
  @person_conjugations ||= {
10
- '1ps' => %w{towis},
11
- '2ps' => %w{towetskes toweckes towecces tontces tonckes tontses },
12
- '3ps' => %w{tos},
13
- '1pp' => %w{towēs},
14
- '2pp' => %w{towatskes towackes towatses }, # towat
15
- '3pp' => %w{towakes}
10
+ '1ps' => %w{owis},
11
+ '2ps' => %w{owetskes oweckes owecces ontces onckes ontses },
12
+ '3ps' => %w{os},
13
+ '1pp' => %w{owēs},
14
+ '2pp' => %w{owatskes owackes owatses }, # towat
15
+ '3pp' => %w{owakes}
16
16
  }
17
17
  end
18
18
 
@@ -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"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OnvkvSeteyoposecetv
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onvkv_seteyoposecetv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tad Hosford