fonemas 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/fonemas.rb +11 -19
- data/lib/fonemas/version.rb +1 -1
- data/spec/fonemas/fonema_spec.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjJmNzk4ZTA1YTMxNmZmYTIxZjc2ZWE4YTgwNmE4MGM1MjZhMGE1OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
N2ZlYjdmYmQ3N2NiMjljMzVlYmE4OGZlZmMwZDVhYTg1NDc5ZjA2OQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjhlMDY4MmVkYzhkNWVjYTZjN2M4MzBhZWQwNjlhN2U4NDMxNTE3MTUxNGZj
|
10
|
+
NzY4MzUzZDIwNWRiZjlkZmI2NWYzNDMxN2E5NTNmYTA1MDg1ZTdjMTMyNmQ0
|
11
|
+
Y2RiM2Y5YzhlZmUxOGYyMTgzNGZjOWVjZDFmZWQ1MjYyZDFjYjU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGJjNzkwMTNiYzc3YTA3YTYwNGM1YmNlMWZjMDc0OTJhN2RlZTMzNTM3MjJl
|
14
|
+
ZGRlNmE0NTVlMzY0NDNmYjA4MmQ1OGUwZDVhZjY2NmIwYTBmODk0ODUxZGJl
|
15
|
+
MzQ1NzM5MDM1OGJiODg5MGI5Y2Q1YmI5MGYxNDM3ZWViOTczMTE=
|
data/lib/fonemas.rb
CHANGED
@@ -159,33 +159,35 @@ module Fonemas
|
|
159
159
|
|
160
160
|
def self.fonemaLetra(letra)
|
161
161
|
case letra
|
162
|
-
when 'a' then ['aa']
|
162
|
+
when 'a','á' then ['aa']
|
163
163
|
when 'b' then ['b ee']
|
164
164
|
when 'c' then ['s ee']
|
165
165
|
when 'd' then ['d ee']
|
166
|
-
when 'e' then ['ee']
|
166
|
+
when 'e','é' then ['ee']
|
167
167
|
when 'f' then ['ee f ee']
|
168
168
|
when 'g' then ['g ee']
|
169
169
|
when 'h' then ['aa ch e']
|
170
|
-
when 'i' then ['ii']
|
170
|
+
when 'i','í' then ['ii']
|
171
171
|
when 'j' then ['j oo t a']
|
172
172
|
when 'k' then ['k aa']
|
173
173
|
when 'l' then ['ee l e']
|
174
174
|
when 'm' then ['ee m e']
|
175
175
|
when 'n' then ['ee n e']
|
176
176
|
when 'ñ' then ['ee nh e']
|
177
|
-
when 'o' then ['oo']
|
177
|
+
when 'o','ó' then ['oo']
|
178
178
|
when 'p' then ['p ee']
|
179
179
|
when 'q' then ['c uu']
|
180
180
|
when 'r' then ['ee rr ee','ee r ee']
|
181
181
|
when 's' then ['ee s e']
|
182
182
|
when 't' then ['t ee']
|
183
|
-
when 'u' then ['uu']
|
183
|
+
when 'u','ú' then ['uu']
|
184
184
|
when 'v' then ['b ee','uu b e']
|
185
185
|
when 'w' then ['d o b l e b ee','d o b l e uu v e']
|
186
186
|
when 'x' then ['ee k i s']
|
187
187
|
when 'y' then ['ll ee']
|
188
188
|
when 'z' then ['z ee t a']
|
189
|
+
else
|
190
|
+
[letra]
|
189
191
|
end
|
190
192
|
end
|
191
193
|
|
@@ -225,9 +227,7 @@ module Fonemas
|
|
225
227
|
fonema << 'a'
|
226
228
|
end
|
227
229
|
when 'b','v' then
|
228
|
-
if word
|
229
|
-
return Fonemas.fonemas('be')
|
230
|
-
elsif isVocal(word,i-1) and (word[i+1] == 'b' or word[i+1] == 'v')
|
230
|
+
if isVocal(word,i-1) and (word[i+1] == 'b' or word[i+1] == 'v')
|
231
231
|
fonema << ['bb','']
|
232
232
|
elsif i == 0 and isVocal(word,i+1)
|
233
233
|
if word[i+1] == 'u' and isDiptongo(word,i+1,i+2)
|
@@ -251,10 +251,7 @@ module Fonemas
|
|
251
251
|
fonema << 'bb'
|
252
252
|
end
|
253
253
|
when 'c' then
|
254
|
-
if word
|
255
|
-
fonema << 's'
|
256
|
-
fonema << 'ee'
|
257
|
-
elsif word[i+1] == 'e' or word[i+1] == 'i'
|
254
|
+
if word[i+1] == 'e' or word[i+1] == 'i'
|
258
255
|
fonema << 's'
|
259
256
|
else
|
260
257
|
fonema << 'k'
|
@@ -266,10 +263,7 @@ module Fonemas
|
|
266
263
|
fonema << ['ch','sh','tch']
|
267
264
|
end
|
268
265
|
when 'd' then
|
269
|
-
if
|
270
|
-
fonema << 'd'
|
271
|
-
fonema << 'e'
|
272
|
-
elsif i == 0 and isVocal(word,i+1)
|
266
|
+
if i == 0 and isVocal(word,i+1)
|
273
267
|
fonema << ['dd','d']
|
274
268
|
elsif entreVocales(word,i) or i == word.size-1
|
275
269
|
fonema << ['d','']
|
@@ -300,9 +294,7 @@ module Fonemas
|
|
300
294
|
end
|
301
295
|
end
|
302
296
|
when 'h' then
|
303
|
-
if word
|
304
|
-
return Fonemas.fonemas('hache')
|
305
|
-
elsif word[i+1] == 'u' and isDiptongo(word,i+1,i+2)
|
297
|
+
if word[i+1] == 'u' and isDiptongo(word,i+1,i+2)
|
306
298
|
fonema << ['','g']
|
307
299
|
end
|
308
300
|
#nada
|
data/lib/fonemas/version.rb
CHANGED
data/spec/fonemas/fonema_spec.rb
CHANGED