medieval_latina 1.0.10 → 1.0.14
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 +4 -4
- data/.ruby-version +1 -1
- data/Gemfile.lock +3 -3
- data/lib/medieval_latina.rb +9 -7
- data/lib/medieval_latina/dictionary.rb +8 -3
- data/lib/medieval_latina/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83020d6a00a33ad2df27cf6c8e3ebf42d339c77723d91e8e8078259739a8618f
|
4
|
+
data.tar.gz: 4f1067b02074cd1f229fd88e45ffbf6b38739803aea9a66facd13745c42d474b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdfe5097cf159eec1091aadeaaefcad995dcd4d0ae7aae9941fbf923716001af69be71372c589ea92bd2b4d745a844214d5e6d201e1701255556471c9856a635
|
7
|
+
data.tar.gz: b19e66ba0eeca8ef7024956e52ccf0eee7699d51865c7c83c010ece4dc12b43a10a3a4e78cfa1678014f81edf44cb91bd6f47126f2fd1ab74f32f2d1e0e04bd8
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.1
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
medieval_latina (1.0.
|
4
|
+
medieval_latina (1.0.14)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
ast (~> 2.4.0)
|
14
14
|
rainbow (3.0.0)
|
15
15
|
rake (12.3.3)
|
16
|
-
rexml (3.2.
|
16
|
+
rexml (3.2.5)
|
17
17
|
rspec (3.9.0)
|
18
18
|
rspec-core (~> 3.9.0)
|
19
19
|
rspec-expectations (~> 3.9.0)
|
@@ -52,4 +52,4 @@ DEPENDENCIES
|
|
52
52
|
standard
|
53
53
|
|
54
54
|
BUNDLED WITH
|
55
|
-
2.2.
|
55
|
+
2.2.15
|
data/lib/medieval_latina.rb
CHANGED
@@ -10,7 +10,7 @@ class MedievalLatina
|
|
10
10
|
|
11
11
|
def initialize(word)
|
12
12
|
@index = 0
|
13
|
-
@word = word
|
13
|
+
@word = word.downcase
|
14
14
|
end
|
15
15
|
|
16
16
|
def call
|
@@ -35,13 +35,15 @@ class MedievalLatina
|
|
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
37
|
j: ->(rest) { "y" },
|
38
|
+
t: ->(rest) { SOFT_T.any? { |item| rest.start_with?(item) } ? "ts" : "t" },
|
38
39
|
x: ->(rest) { "ks" }
|
39
40
|
}
|
40
|
-
CONSONENT_TEAMS = {gn: "n-y", qu: "kw"}
|
41
|
-
SOFT_C = ["e", "i", "ae", "oe"]
|
41
|
+
CONSONENT_TEAMS = {gn: "n-y", qu: "kw"}.freeze
|
42
|
+
SOFT_C = ["e", "i", "ae", "oe"].freeze
|
42
43
|
SOFT_G = SOFT_C
|
43
|
-
|
44
|
-
|
44
|
+
SOFT_T = ["i"].freeze
|
45
|
+
VOWEL_TEAMS = {ae: "ay", oe: "ay", au: "ou"}.freeze
|
46
|
+
VOWELS = {a: "ah", e: "ay", i: "ee", o: "oh", u: "oo"}.freeze
|
45
47
|
|
46
48
|
Result = Struct.new(:substring, :increment_by)
|
47
49
|
|
@@ -74,11 +76,11 @@ class MedievalLatina
|
|
74
76
|
|
75
77
|
def initialize(text, index)
|
76
78
|
@character = text[index]
|
77
|
-
@rest = text
|
79
|
+
@rest = text[index + 1..-1].chars.join
|
78
80
|
end
|
79
81
|
|
80
82
|
def to_team
|
81
|
-
"#{character}#{rest
|
83
|
+
"#{character}#{rest[0]}".intern
|
82
84
|
end
|
83
85
|
end
|
84
86
|
|
@@ -1,14 +1,19 @@
|
|
1
1
|
class MedievalLatina
|
2
2
|
DICTIONARY = {
|
3
3
|
"alma" => "almuh",
|
4
|
+
"amo" => "amo",
|
4
5
|
"ego" => "ay-goh",
|
5
|
-
"
|
6
|
+
"es" => "es",
|
7
|
+
"est" => "est",
|
8
|
+
"estis" => "estis",
|
6
9
|
"ex" => "ex",
|
10
|
+
"et" => "et",
|
7
11
|
"duo" => "doo-oh",
|
8
12
|
"mater" => "mah-tare",
|
9
13
|
"octo" => "awk-toh",
|
10
|
-
"omnia" => "ohm-
|
14
|
+
"omnia" => "ohm-nia",
|
11
15
|
"optime" => "op-tee-may",
|
12
|
-
"quo" => "quo"
|
16
|
+
"quo" => "quo",
|
17
|
+
"toga" => "toga"
|
13
18
|
}.freeze
|
14
19
|
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.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jayson Virissimo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-22 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.
|
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: '0'
|
59
59
|
requirements: []
|
60
|
-
rubygems_version: 3.2.
|
60
|
+
rubygems_version: 3.2.15
|
61
61
|
signing_key:
|
62
62
|
specification_version: 4
|
63
63
|
summary: Transform medieval Latin text into phonetic English
|