medieval_latina 1.0.10 → 1.0.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce4b7b104e53b0e56816e2c8c3f1a981ead3bea20900376fe1edf1f6832fccf2
4
- data.tar.gz: 17c55b30e3bd9ab5963c652e97b6acd48b52d75aa604268b67e1570c057a101c
3
+ metadata.gz: 83020d6a00a33ad2df27cf6c8e3ebf42d339c77723d91e8e8078259739a8618f
4
+ data.tar.gz: 4f1067b02074cd1f229fd88e45ffbf6b38739803aea9a66facd13745c42d474b
5
5
  SHA512:
6
- metadata.gz: 3dffeb2275571101e70de8c83612941ab89c27f614969c77584c64ffbc9f8d1a5c09c59c4a86edda489c8a3237171eb025f908652b298426e714f5da4b4e078f
7
- data.tar.gz: 7885e50517d8c23e5408869fd7296118951d3939f0abf2b8c1646224aef1368111d79671b07845057a200fe568343f85eba80af778305f23b6f16b9b74c3e6e2
6
+ metadata.gz: fdfe5097cf159eec1091aadeaaefcad995dcd4d0ae7aae9941fbf923716001af69be71372c589ea92bd2b4d745a844214d5e6d201e1701255556471c9856a635
7
+ data.tar.gz: b19e66ba0eeca8ef7024956e52ccf0eee7699d51865c7c83c010ece4dc12b43a10a3a4e78cfa1678014f81edf44cb91bd6f47126f2fd1ab74f32f2d1e0e04bd8
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.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.10)
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.4)
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.13
55
+ 2.2.15
@@ -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
- VOWEL_TEAMS = {ae: "ay", oe: "ay", au: "ou"}
44
- VOWELS = {a: "ah", e: "ay", i: "ee", o: "oh", u: "oo"}
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.chars.drop(index + 1).join
79
+ @rest = text[index + 1..-1].chars.join
78
80
  end
79
81
 
80
82
  def to_team
81
- "#{character}#{rest.chars.first}".intern
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
- "et" => "ate",
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-nee-ah",
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
@@ -1,3 +1,3 @@
1
1
  class MedievalLatina
2
- VERSION = "1.0.10"
2
+ VERSION = "1.0.14"
3
3
  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.10
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-03-05 00:00:00.000000000 Z
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.3
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