medieval_latina 1.0.2 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/medieval_latina.rb +5 -4
- data/lib/medieval_latina/dictionary.rb +10 -3
- data/lib/medieval_latina/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b633d0e22c3a1c2dff35e5e8cb2276fa9917268f5267ec63595f7caf6a6c746
|
4
|
+
data.tar.gz: 94db065671a3f3f2f732fa74293cc7a33416853db8a5e66a45c2fb7e490ca781
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2527073503c1c18da8047d98697ebeeb0f7002d469e5999f8992b856bdfe557ee084467427a2766edf3593ea623efd93f6bb8d87f3a1625b7b1a199b76584a7
|
7
|
+
data.tar.gz: 041c8d5d20dc04a1abcdf7d3ee3d6e3d78d41b639bccaa22861d44cb7fe3587a3afcc31a7f57712869f631b2bc09aa8f59db55d66051df570d1abc1f6bca24a3
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -35,7 +35,7 @@ Then, run `rake spec` to run the tests.
|
|
35
35
|
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
36
36
|
|
37
37
|
To install this gem onto your local machine, run `bundle exec rake install`.
|
38
|
-
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
38
|
+
To release a new version, update the version number in `version.rb`, run `bin/setup` to increment the version in the lock file, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
39
39
|
Run `standardrb --fix` before submitting any changes, to help keep the code formatting uniform.
|
40
40
|
|
41
41
|
## Contributing
|
data/lib/medieval_latina.rb
CHANGED
@@ -3,9 +3,9 @@ require "medieval_latina/version"
|
|
3
3
|
|
4
4
|
class MedievalLatina
|
5
5
|
def self.[](text)
|
6
|
-
text.split(" ").map
|
6
|
+
text.split(" ").map { |word|
|
7
7
|
DICTIONARY[word.downcase] || new(word).call
|
8
|
-
|
8
|
+
}.join(" ")
|
9
9
|
end
|
10
10
|
|
11
11
|
def initialize(word)
|
@@ -34,12 +34,13 @@ class MedievalLatina
|
|
34
34
|
CONSONENTS = {
|
35
35
|
c: ->(rest) { SOFT_C.any? { |item| rest.start_with?(item) } ? "ch" : "k" },
|
36
36
|
g: ->(rest) { SOFT_G.any? { |item| rest.start_with?(item) } ? "j" : "g" },
|
37
|
-
j: ->(rest) { "y" }
|
37
|
+
j: ->(rest) { "y" },
|
38
|
+
x: ->(rest) { "ks" }
|
38
39
|
}
|
39
40
|
CONSONENT_TEAMS = {qu: "kw"}
|
40
41
|
SOFT_C = ["e", "i", "ae", "oe"]
|
41
42
|
SOFT_G = SOFT_C
|
42
|
-
VOWEL_TEAMS = {ae: "ay", oe: "ay", au: "
|
43
|
+
VOWEL_TEAMS = {ae: "ay", oe: "ay", au: "ou"}
|
43
44
|
VOWELS = {a: "ah", e: "ay", i: "ee", o: "oh", u: "oo"}
|
44
45
|
|
45
46
|
Result = Struct.new(:substring, :increment_by)
|
@@ -1,5 +1,12 @@
|
|
1
1
|
class MedievalLatina
|
2
2
|
DICTIONARY = {
|
3
|
-
"
|
4
|
-
|
5
|
-
|
3
|
+
"alma" => "almuh",
|
4
|
+
"et" => "ate",
|
5
|
+
"ex" => "ex",
|
6
|
+
"duo" => "doo-oh",
|
7
|
+
"mater" => "mah-tare",
|
8
|
+
"octo" => "awk-toh",
|
9
|
+
"optime" => "op-tee-may",
|
10
|
+
"quo" => "quo"
|
11
|
+
}.freeze
|
12
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: medieval_latina
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jayson Virissimo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
There are good text-to-speech engines for English and classical Latin, but none for medieval Latin.
|