fonemas 0.2.7 → 0.2.8
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 +3 -6
- data/lib/fonemas/version.rb +1 -1
- data/spec/fonemas/fonema_spec.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjU4OGVjOTdlMDQxODlkYzNjZTc3MjBhMDdhMDVhODE3ZDNhOTdmZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTg3NWFmOTI0MWY3MWZjODQzZTMxZWM3OWVkMzA1MmM4NjIwZmM1NQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTVlNGFjNGQyZDkwZmViYjNkNTU2NjJhNWM2YWFlMTllYmY5YTVlZThhM2Rl
|
10
|
+
YzIxY2MzN2IyMzc5MDJkMjI1NmJlYzU2Y2Y0MjIxZTAxY2ZkNDViNWQyNGZl
|
11
|
+
MWM3NDFhMGY5OTkzYWM1NGJjM2EwZGI4OTExZTgyYzJkYzdkNTQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjFhZTNjY2ZlOGJlZWMzNGZkMzVlZDRiNjcyODI1YTI4ODUwOGY0MjNiZTZh
|
14
|
+
MDcxMmM5OGIxNWFjNWQ5Mjk2ZjY0YjMxNDgwNDdjMTQ5OTBmODJjYzY4MzUw
|
15
|
+
MWYwM2QzMjUzYmNjZTU2MjA2N2RmMGVmMThkNWI4MzRhZTg4YWI=
|
data/lib/fonemas.rb
CHANGED
@@ -193,6 +193,7 @@ module Fonemas
|
|
193
193
|
|
194
194
|
|
195
195
|
def self.fonemas(word)
|
196
|
+
word = word.gsub(/'/,'')
|
196
197
|
if word.size == 1
|
197
198
|
return fonemaLetra(word)
|
198
199
|
end
|
@@ -281,7 +282,7 @@ module Fonemas
|
|
281
282
|
when 'f' then
|
282
283
|
fonema << 'f'
|
283
284
|
when 'g' then
|
284
|
-
if word[i+1] == 'u' and i == 0
|
285
|
+
if word[i+1] == 'u' and i == 0 and isTonica(word,i+2)
|
285
286
|
#nada
|
286
287
|
|
287
288
|
elsif word[i+1] == 'e' or word[i+1] == 'i'
|
@@ -353,12 +354,8 @@ module Fonemas
|
|
353
354
|
when 'ü' then
|
354
355
|
fonema << 'u'
|
355
356
|
when 'u' then
|
356
|
-
if word[i-1] == 'g' and i == 1
|
357
|
-
if isTonica(word,i+1)
|
357
|
+
if word[i-1] == 'g' and i == 1 and isTonica(word,i+1)
|
358
358
|
fonema << ['gu']
|
359
|
-
else
|
360
|
-
fonema += [['g',''],'u']
|
361
|
-
end
|
362
359
|
elsif isTonica(word,i)
|
363
360
|
fonema << 'uu'
|
364
361
|
else
|
data/lib/fonemas/version.rb
CHANGED
data/spec/fonemas/fonema_spec.rb
CHANGED
@@ -27,7 +27,8 @@ describe Fonemas do
|
|
27
27
|
Fonemas.fonemas('d').should_not include('')
|
28
28
|
Fonemas.fonemas('dé').should include('d ee')
|
29
29
|
Fonemas.fonemas('guatón').should include('g u a t oo n')
|
30
|
-
Fonemas.fonemas('gu').should include('
|
30
|
+
Fonemas.fonemas('gu').should include('gg u')
|
31
|
+
Fonemas.fonemas('guagua').should include('gu aa g u a')
|
31
32
|
for i in Fonemas.fonemas('adskribir')
|
32
33
|
i.should end_with('ii r')
|
33
34
|
end
|