fonemas 0.7.1 → 0.7.2
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 +8 -8
- data/lib/fonemas.rb +8 -2
- data/lib/fonemas/version.rb +1 -1
- data/spec/fonemas/fonema_spec.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjlmYjE2YTQxZTExYjMxYTIwZmQ0NjYxZGJhZDRlN2ExYmZhNTllYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjhkZTYzMTIxZmMyNTI0ZTQzMTJkMWVkNzgxNWQ4OWRiOWYxY2Y0Zg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDNlM2FhOTQ4M2QyYjUwYzM0ZjRjMTQwZGY5MzRiZDVhNTMxNDFiYjFlNjBk
|
10
|
+
ZjI0ZTkyMGIzYzI4YWNiMTBjODQ0OGVmZmRhZmJhODY3YTVkMjBhMzE0N2Qy
|
11
|
+
MjVhZDVlNGU3MDg2NjE4ZjhhYzc5NWMwOThhNWJmMmU4ZGQxZDE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZWJiNGIyOGVkY2FjYzBjNGM5YTE4ODA0YjU4YzFjMmRkMWZlYjQyNDkwMDc0
|
14
|
+
MDAzMmFmNjJlNGYwNDBmMGRlMmM2ZWFjMWQyMTdjZjE1YzAwODllZTViZDVl
|
15
|
+
YzY0MWVjNDUzYmY5YzJiOTFmOGQ1MjY2Mjg1YTQwMzFlMmYyMmU=
|
data/lib/fonemas.rb
CHANGED
@@ -401,7 +401,9 @@ module Fonemas
|
|
401
401
|
letra = word[i]
|
402
402
|
case letra
|
403
403
|
when 'a','á','ä','ã' then
|
404
|
-
if isTonica(word,i)
|
404
|
+
if isTonica(word,i) and word[i+1] == 'y' and word[i+2] == 'l'
|
405
|
+
fonema << 'ee'
|
406
|
+
elsif isTonica(word,i)
|
405
407
|
fonema << 'aa'
|
406
408
|
else
|
407
409
|
fonema << 'a'
|
@@ -560,7 +562,9 @@ module Fonemas
|
|
560
562
|
fonema << 'u'
|
561
563
|
end
|
562
564
|
when 'w' then
|
563
|
-
if
|
565
|
+
if word[i-1] == 'l'
|
566
|
+
fonema << [['g','u']]
|
567
|
+
elsif i == 0 and word[i+1] == 'e'
|
564
568
|
fonema << ['u']
|
565
569
|
elsif i == 0
|
566
570
|
fonema << ['b']
|
@@ -580,6 +584,8 @@ module Fonemas
|
|
580
584
|
when 'y' then
|
581
585
|
if i == word.size - 1
|
582
586
|
fonema << 'i'
|
587
|
+
elsif word[i+1] == 'l'
|
588
|
+
fonema << 'i'
|
583
589
|
else
|
584
590
|
#fonema << ['ll','lli','i']
|
585
591
|
fonema << 'll'
|
data/lib/fonemas/version.rb
CHANGED
data/spec/fonemas/fonema_spec.rb
CHANGED
@@ -150,6 +150,8 @@ describe Fonemas do
|
|
150
150
|
|
151
151
|
it 'nombres propios proseen su propias reglas' do
|
152
152
|
Fonemas.fonemas('hertz')[0].should eql('j e r t s')
|
153
|
+
Fonemas.fonemas('aylwin').should_not include("aa ll l u i n")
|
154
|
+
Fonemas.fonemas('aylwin').should include("ee i l g u i n")
|
153
155
|
|
154
156
|
end
|
155
157
|
|
@@ -168,4 +170,5 @@ describe Fonemas do
|
|
168
170
|
Fonemas.fonemas('web').should include('u ee b')
|
169
171
|
end
|
170
172
|
|
173
|
+
|
171
174
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fonemas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel Bahamondez Honores
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|