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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjRhM2RiMmMzYzU0ZjkwYzBmZTdhNDdkMGQxNTAwZmZkZGU3NTliMA==
4
+ MDA2YmM2OWMyYjJlOTM4NTM5YzRiZWIxMDYzMmQyOWY1MmYzNDczYQ==
5
5
  data.tar.gz: !binary |-
6
- OWU4NGRmODk2MTNiZjhiYTcxZTQ5YjJlOWQ0NWNjYWJlZTE2NzMyZg==
6
+ ZmRlOTcyMDViYTFiNzhiNTU1ZTI2ZDZmOTNmNjRiMzU2YmNkZmMwZA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YjM2M2NjODUxZWJkZTFjMDA5MzU0YzkzZTUxM2U0N2M0NDc1NzY4Mjc2NWRh
10
- NTAwY2M4YzhmNWZhMTJkN2U0N2RhNGYyZTAxZmQyZDc5ZjIzNjlmZDg5NDY3
11
- Y2ZlODJjZDJlN2Q1N2E5ZjI4MzA5Mzk0MjIzOTUyY2YxMTY4Mjc=
9
+ Mzc2NDk4NWFiNTdhMGEzYTVjNTg3ODM2ZTc2NzRmM2JlMzcyNzI4MDgzY2E2
10
+ YzU4NWQ1YTM1NmEzYzAzYTk3YTcwNDkxOGJkOWVlMjFlOWU0MGNjMGQzOGE0
11
+ MjE4MmZiMjE5MjRlMmYwMDFiYmFjNTc0Nzk2YjgyY2VjOWFkNGQ=
12
12
  data.tar.gz: !binary |-
13
- YTQ3YmU4ZDdjMzdlMGMzMDUxMjIwYjdmN2M1MzI2YTQ5MzQ4ZGVjMjZjMTQ2
14
- MzNjZTFjZjFmNjQ2YTYzZWJmNjNmNzMzNGM5MzkwODVmNThlODFlMWNlMzc4
15
- N2E3OTQ1YmVlMmY3NjFmOTNiYWM3NGIzOTFmMGQwYzk2ODhkMWE=
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 << ['B','']
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 << ['B','b','g']
186
+ fonema << ['bb','b','g']
187
187
  else
188
- fonema << ['B','b']
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 << ['B','g']
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 << 'B'
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 << ['D','d']
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 << ['D','d']
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 << 'G'
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 << 'R'
288
+ fonema << 'rr'
289
289
  else
290
290
  fonema << 'r'
291
291
  end
292
292
  when 'rr' then
293
- fonema << 'R'
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','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
- elsif entreVocales(word,i)
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{B b d e f g h i j k l m n o p q R r s t u w ks k h Gu gu ch tch sh D G ll lli nh}
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
 
@@ -1,3 +1,3 @@
1
1
  module Fonemas
2
- VERSION = "0.1.14"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -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 D aa d')
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 B s t r a ee r')
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 R a')
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('D i ee n t e')
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('B u ee n o')
24
- Fonemas.fonemas('obvio').should include('oo B b i o')
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 R a')
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.14
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-19 00:00:00.000000000 Z
11
+ date: 2013-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler