fonemas 0.1.14 → 0.2.1
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 +15 -15
- data/lib/fonemas/version.rb +1 -1
- data/spec/fonemas/fonema_spec.rb +7 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDA2YmM2OWMyYjJlOTM4NTM5YzRiZWIxMDYzMmQyOWY1MmYzNDczYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmRlOTcyMDViYTFiNzhiNTU1ZTI2ZDZmOTNmNjRiMzU2YmNkZmMwZA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Mzc2NDk4NWFiNTdhMGEzYTVjNTg3ODM2ZTc2NzRmM2JlMzcyNzI4MDgzY2E2
|
10
|
+
YzU4NWQ1YTM1NmEzYzAzYTk3YTcwNDkxOGJkOWVlMjFlOWU0MGNjMGQzOGE0
|
11
|
+
MjE4MmZiMjE5MjRlMmYwMDFiYmFjNTc0Nzk2YjgyY2VjOWFkNGQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzNlMmZhMDFkZDgwZGIzYTA5YTkyOWQ3OGQ5OTc2YmNiNWEzYzg3NzkxNzM3
|
14
|
+
MzA0ZDM1NzA3NjU4ODZhNzc3ZmM0Mjc3NDFmMzA2ZWQ3OTAwYWY3YTQ3MmRi
|
15
|
+
NWY1Yzk3MTI0YzAyN2ZlNjU0MGE3MWU0MzM2ZGZlZWVlMjAwZTY=
|
data/lib/fonemas.rb
CHANGED
@@ -180,18 +180,18 @@ module Fonemas
|
|
180
180
|
end
|
181
181
|
when 'b','v' then
|
182
182
|
if isVocal(word,i-1) and (word[i+1] == 'b' or word[i+1] == 'v')
|
183
|
-
fonema << ['
|
183
|
+
fonema << ['bb','']
|
184
184
|
elsif i == 0 and isVocal(word,i+1)
|
185
185
|
if word[i+1] == 'u' and isDiptongo(word,i+1,i+2)
|
186
|
-
fonema << ['
|
186
|
+
fonema << ['bb','b','g']
|
187
187
|
else
|
188
|
-
fonema << ['
|
188
|
+
fonema << ['bb','b']
|
189
189
|
end
|
190
190
|
elsif word[i+1] == 'u' and isDiptongo(word,i+1,i+2)
|
191
191
|
if entreVocales(word,i)
|
192
192
|
fonema << ['b','g','']
|
193
193
|
else
|
194
|
-
fonema << ['
|
194
|
+
fonema << ['bb','g']
|
195
195
|
end
|
196
196
|
elsif isFricativa(word,i-1)
|
197
197
|
fonema << 'b'
|
@@ -200,7 +200,7 @@ module Fonemas
|
|
200
200
|
elsif entreVocales(word,i)
|
201
201
|
fonema << ['b','']
|
202
202
|
else
|
203
|
-
fonema << '
|
203
|
+
fonema << 'bb'
|
204
204
|
end
|
205
205
|
when 'c' then
|
206
206
|
if word[i+1] == 'e' or word[i+1] == 'i'
|
@@ -219,11 +219,11 @@ module Fonemas
|
|
219
219
|
fonema << 'd'
|
220
220
|
fonema << 'e'
|
221
221
|
elsif i == 0 and isVocal(word,i+1)
|
222
|
-
fonema << ['
|
222
|
+
fonema << ['dd','d']
|
223
223
|
elsif entreVocales(word,i) or i == word.size-1
|
224
224
|
fonema << ['d','']
|
225
225
|
elsif entreVocalyConsonante(word,i)
|
226
|
-
fonema << ['
|
226
|
+
fonema << ['dd','d']
|
227
227
|
else
|
228
228
|
fonema << 'd'
|
229
229
|
end
|
@@ -243,7 +243,7 @@ module Fonemas
|
|
243
243
|
fonema << 'j'
|
244
244
|
else
|
245
245
|
if !entreVocales(word,i) and word[i-1] != 'n'
|
246
|
-
fonema << '
|
246
|
+
fonema << 'gg'
|
247
247
|
else
|
248
248
|
fonema << 'g'
|
249
249
|
end
|
@@ -285,12 +285,12 @@ module Fonemas
|
|
285
285
|
fonema << 'k'
|
286
286
|
when 'r' then
|
287
287
|
if i == 0
|
288
|
-
fonema << '
|
288
|
+
fonema << 'rr'
|
289
289
|
else
|
290
290
|
fonema << 'r'
|
291
291
|
end
|
292
292
|
when 'rr' then
|
293
|
-
fonema << '
|
293
|
+
fonema << 'rr'
|
294
294
|
when 's' then
|
295
295
|
if word[i-1] == 'r' or word[i-1] == 'd' or i == word.size-1
|
296
296
|
fonema << ['s','','h']
|
@@ -320,15 +320,15 @@ module Fonemas
|
|
320
320
|
end
|
321
321
|
when 'w' then
|
322
322
|
if i == 0
|
323
|
-
fonema << ['b','
|
323
|
+
fonema << ['b','bb']
|
324
324
|
elsif word[i-1] == 'o'
|
325
325
|
fonema << 'u'
|
326
326
|
elsif word[i+1] == 'i'
|
327
327
|
fonema << 'u'
|
328
|
-
|
328
|
+
else #if entreVocales(word,i)
|
329
329
|
fonema << 'gu'
|
330
|
-
else
|
331
|
-
fonema << 'Gu'
|
330
|
+
# else
|
331
|
+
# fonema << 'Gu'
|
332
332
|
end
|
333
333
|
when 'x' then
|
334
334
|
fonema << ['ks','k','h']
|
@@ -420,7 +420,7 @@ module Fonemas
|
|
420
420
|
def self.lista_de_fonemas
|
421
421
|
phonelist = ['SIL']
|
422
422
|
phonelist += %w{a e i o u aa ee ii oo uu}
|
423
|
-
phonelist += %w{
|
423
|
+
phonelist += %w{bb b d e f g h i j k l m n o p q rr r s t u w ks k h gu ch tch sh dd gg ll lli nh}
|
424
424
|
phonelist.uniq
|
425
425
|
end
|
426
426
|
|
data/lib/fonemas/version.rb
CHANGED
data/spec/fonemas/fonema_spec.rb
CHANGED
@@ -7,23 +7,23 @@ describe Fonemas do
|
|
7
7
|
Fonemas.fonemas('ungüento').should include("u n g u ee n t o")
|
8
8
|
Fonemas.fonemas('abuela').should include('a g u ee l a')
|
9
9
|
Fonemas.fonemas('aro').should include('aa r o')
|
10
|
-
Fonemas.fonemas('bondad').should include('b o n
|
10
|
+
Fonemas.fonemas('bondad').should include('b o n dd aa d')
|
11
11
|
Fonemas.fonemas('gestión').should include('j e s t i oo n')
|
12
|
-
Fonemas.fonemas('abstraer').should include('a
|
12
|
+
Fonemas.fonemas('abstraer').should include('a bb s t r a ee r')
|
13
13
|
Fonemas.fonemas('presidida').should include('p r e s i ii d a')
|
14
|
-
Fonemas.fonemas('guerra').should include('gu ee
|
14
|
+
Fonemas.fonemas('guerra').should include('gu ee rr a')
|
15
15
|
Fonemas.fonemas('buitre').should include('g u ii t r e')
|
16
16
|
Fonemas.fonemas('huaso').should include('g u aa s o')
|
17
17
|
Fonemas.fonemas('huevo').should include('g u ee b o')
|
18
18
|
Fonemas.fonemas('huevo').should include('g u ee o')
|
19
19
|
Fonemas.fonemas('huifa').should include('g u ii f a')
|
20
20
|
Fonemas.fonemas('diente').should include('d i ee n t e')
|
21
|
-
Fonemas.fonemas('diente').should include('
|
21
|
+
Fonemas.fonemas('diente').should include('dd i ee n t e')
|
22
22
|
Fonemas.fonemas('bueno').should include('b u ee n o')
|
23
|
-
Fonemas.fonemas('bueno').should include('
|
24
|
-
Fonemas.fonemas('obvio').should include('oo
|
23
|
+
Fonemas.fonemas('bueno').should include('bb u ee n o')
|
24
|
+
Fonemas.fonemas('obvio').should include('oo bb b i o')
|
25
25
|
Fonemas.fonemas('obvio').should include('oo b i o')
|
26
|
-
Fonemas.fonemas('guerra').should_not include('ee
|
26
|
+
Fonemas.fonemas('guerra').should_not include('ee rr a')
|
27
27
|
Fonemas.fonemas('d').should_not include('')
|
28
28
|
Fonemas.fonemas('d').should include('d e')
|
29
29
|
|
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.1
|
4
|
+
version: 0.2.1
|
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: 2013-06-
|
11
|
+
date: 2013-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|