onvkv_seteyoposecetv 0.1.1 → 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
|
data/README.md
CHANGED
|
@@ -1,24 +1,18 @@
|
|
|
1
1
|
# OnvkvSeteyoposecetv
|
|
2
2
|
|
|
3
|
-
TODO: Delete this and the text below, and describe your gem
|
|
4
|
-
|
|
5
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/onvkv_seteyoposecetv`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
6
|
-
|
|
7
3
|
## Installation
|
|
8
4
|
|
|
9
|
-
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
|
10
|
-
|
|
11
5
|
Install the gem and add to the application's Gemfile by executing:
|
|
12
6
|
|
|
13
|
-
$ bundle add
|
|
7
|
+
$ bundle add onvkv_seteyoposecetv
|
|
14
8
|
|
|
15
9
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
|
16
10
|
|
|
17
|
-
$ gem install
|
|
11
|
+
$ gem install onvkv_seteyoposecetv
|
|
18
12
|
|
|
19
13
|
## Usage
|
|
20
14
|
|
|
21
|
-
|
|
15
|
+
See test/unit/ examples and https://www.nokose-oklane.com/conjugations/action_verb?word=liketv for sample output
|
|
22
16
|
|
|
23
17
|
## Development
|
|
24
18
|
|
|
@@ -28,7 +22,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
28
22
|
|
|
29
23
|
## Contributing
|
|
30
24
|
|
|
31
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
25
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/rthbound/onvkv_seteyoposecetv. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/rthbound/onvkv_seteyoposecetv/blob/main/CODE_OF_CONDUCT.md).
|
|
32
26
|
|
|
33
27
|
## License
|
|
34
28
|
|
|
@@ -36,4 +30,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
36
30
|
|
|
37
31
|
## Code of Conduct
|
|
38
32
|
|
|
39
|
-
Everyone interacting in the OnvkvSeteyoposecetv project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
|
33
|
+
Everyone interacting in the OnvkvSeteyoposecetv project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/rthbound/onvkv_seteyoposecetv/blob/main/CODE_OF_CONDUCT.md).
|
|
@@ -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
|
|
@@ -327,11 +327,15 @@ module Conjugators
|
|
|
327
327
|
final_vowel_index = @verb_to_conjugate.rindex(VOWEL_REGEX)
|
|
328
328
|
return unless final_vowel_index
|
|
329
329
|
|
|
330
|
-
# L-M-N rule
|
|
331
330
|
ue_rule_substring = @verb_to_conjugate[(final_vowel_index-1)..final_vowel_index]
|
|
331
|
+
# dipthong rule
|
|
332
332
|
return if ue_rule_substring == UE
|
|
333
|
-
|
|
334
|
-
|
|
333
|
+
# LMN rule: VlC, VmC, or VnC pattern (where V=vowel, C=consonant)
|
|
334
|
+
next_char = @verb_to_conjugate[final_vowel_index + 1]
|
|
335
|
+
next_next_char = @verb_to_conjugate[final_vowel_index + 2]
|
|
336
|
+
return if (next_char == L || next_char == M || next_char == N) &&
|
|
337
|
+
next_next_char &&
|
|
338
|
+
consonants.include?(next_next_char)
|
|
335
339
|
|
|
336
340
|
# replace the final vowel with the l-graded vowel
|
|
337
341
|
@verb_to_conjugate[final_vowel_index] = LGRADES.fetch(@verb_to_conjugate[final_vowel_index], @verb_to_conjugate[final_vowel_index])
|
|
@@ -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"
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: onvkv_seteyoposecetv
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tad Hosford
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies: []
|
|
13
12
|
description: Just relocating some code to make it sharable
|
|
14
13
|
email:
|
|
@@ -50,7 +49,6 @@ metadata:
|
|
|
50
49
|
source_code_uri: https://github.com/rthbound/onvkv_seteyoposecetv
|
|
51
50
|
changelog_uri: https://github.com/rthbound/onvkv_seteyoposecetv/blob/main/CHANGELOG.md
|
|
52
51
|
homepage_uri: https://github.com/rthbound/onvkv_seteyoposecetv
|
|
53
|
-
post_install_message:
|
|
54
52
|
rdoc_options: []
|
|
55
53
|
require_paths:
|
|
56
54
|
- lib
|
|
@@ -65,8 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
65
63
|
- !ruby/object:Gem::Version
|
|
66
64
|
version: '0'
|
|
67
65
|
requirements: []
|
|
68
|
-
rubygems_version: 3.
|
|
69
|
-
signing_key:
|
|
66
|
+
rubygems_version: 3.7.1
|
|
70
67
|
specification_version: 4
|
|
71
68
|
summary: Extracting conjugator library code from https://www.nokose-oklane.com
|
|
72
69
|
test_files: []
|