fonemas 0.7.3 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzkxOGY2YjExMjVmNmEzY2QyOTQ1NDkzNjk0Y2UzYTdhYTgyMDc4MA==
4
+ NDBhMWExOWI2OGNmZThjOTY0MDQ2Yzg3OGQzNjVhMmFiYmZiMjU1Zg==
5
5
  data.tar.gz: !binary |-
6
- MDAyZmY3MjVjODZmOTc1NDI2YWFlNjk4MmRiNDQ2ZmJlODkwNmFiMw==
6
+ N2I1NzFjMjNmMzgzYmJkMjViNzg4ZDQwNzIwYWJiNjE1MzhhNmUwYQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZjYxOTlkZjdlZjBiMGY5NGY3MjcwNjQ4ZDQyZWE3ZDQwMjFmZDViODU0N2Qx
10
- MDVmYjI1M2VmYWI4YjljOTZiN2RlOWIyMTZiOTUzY2YzZjNhNjU5YTU1Nzky
11
- NGQ3Y2NjZmVjYjg0NmI2MGUyNzRkOWE2OTJjYzZhN2NkMWM2M2U=
9
+ ZTIwZGM4ZTE3NzMzMTYwOGM5MDMwNzkxM2VmOGI5Mjc0ZmY4Y2FiYTczYzVj
10
+ MmEwOTIwYjRkODBlODhhODlmYmY3NTk1ZGI4MzU1OTM5ZDNiM2VkZTRmZTY2
11
+ YzNjZDUwZGZiYjkwNDQ1YmI4MzBjOWY0MzQ5YTRjYzA1NmE4MGE=
12
12
  data.tar.gz: !binary |-
13
- ODAyYWYxYzhjY2NiMzAzMTNkYzQyZjE4NmNhNzQzMWNjNzZkZTY1NjA1Mjk3
14
- NDc3YWUwYzRlNmJjM2IwNjQxODUyMmVlNmI3YzE3MDkzZWY1YjJlM2NjYjRj
15
- NmY0ZmY5YjhhOGI3MmQyNzczOTUyZmI2MTRiNmQwYjZkMGQwYTM=
13
+ ZDUzODBmNTUxZDA1NWZmODBkMmQ0Y2Y3ZTZlZmNlNjIzOTZmYjUyOTEyZmRj
14
+ OTU2OTkxOWNjNjM1OWE2M2RiYjk4MDY5YmIxNDExNjBkYjM1NWYwYjNjNTdm
15
+ MWQ4YmNjYWU2NzZlZjNiMWQ0NmU2ODk1NGU2OWMxNWJhMWIwMTA=
data/lib/fonemas.rb CHANGED
@@ -327,6 +327,7 @@ module Fonemas
327
327
  end
328
328
 
329
329
  def self.fonemaLetra(letra)
330
+ #cuando la palabra solo tiene una letra se usa esta pronunciación
330
331
  case letra
331
332
  when 'a','á' then ['aa']
332
333
  when 'b' then ['b ee']
@@ -353,7 +354,7 @@ module Fonemas
353
354
  when 'v' then ['b ee','uu b e']
354
355
  when 'w' then ['d o b l e b ee','d o b l e uu b e']
355
356
  when 'x' then ['ee k i s']
356
- when 'y' then ['ll ee']
357
+ when 'y' then ['ii']
357
358
  when 'z' then ['s ee t a']
358
359
  else
359
360
  raise "error, no conozco pronunciación de #{letra}"
@@ -578,9 +579,15 @@ module Fonemas
578
579
  # fonema << 'Gu'
579
580
  end
580
581
  when 'x' then
582
+ if i == 0 and word[i+1] == 'a'
583
+ fonema << 'j'
584
+ elsif i== 0 and word[i+1] == 'i'
585
+ fonema << 's'
586
+ else
587
+ fonema << [['k','s']]
588
+ end
581
589
  #fonema << ['ks','k','h']
582
590
  #fonema << ['ks','k']
583
- fonema << 'ks'
584
591
  when 'y' then
585
592
  if i == word.size - 1
586
593
  fonema << 'i'
@@ -673,7 +680,8 @@ module Fonemas
673
680
  def self.lista_de_fonemas
674
681
  phonelist = ['SIL']
675
682
  phonelist += %w{a e i o u aa ee ii oo uu}
676
- phonelist += %w{b d e f g i j k l m n o p rr r s t u ks k ch ll nh}
683
+ phonelist += %w{b d e f g i j k l m n o p rr r s t u k ch ll nh}
684
+ phonelist << '++RUIDO++'
677
685
  phonelist.uniq
678
686
  end
679
687
 
@@ -1,3 +1,3 @@
1
1
  module Fonemas
2
- VERSION = '0.7.3'
2
+ VERSION = '0.7.4'
3
3
  end
@@ -35,7 +35,7 @@ describe Fonemas do
35
35
  i.should end_with('ii r')
36
36
  end
37
37
  Fonemas.fonemas('alcancía').should include('a l k a n s ii a')
38
- Fonemas.fonemas('aproximadamente').should include('a p r o ks i m a d a m ee n t e')
38
+ Fonemas.fonemas('aproximadamente').should include('a p r o k s i m a d a m ee n t e')
39
39
  Fonemas.fonemas('aproximadamente').should_not include('a p r o k i m a d a m ee n t e')
40
40
  Fonemas.fonemas('software').should include('s o f t g u aa r e')
41
41
  Fonemas.fonemas('llamémosla').should include('ll a m ee m o s l a')
@@ -99,7 +99,7 @@ describe Fonemas do
99
99
  Fonemas.fonemas('w').should include('d o b l e b ee')
100
100
  Fonemas.fonemas('w').should include('d o b l e uu b e')
101
101
  Fonemas.fonemas('x').should include('ee k i s')
102
- Fonemas.fonemas('y').should include('ll ee')
102
+ Fonemas.fonemas('y').should include('ii')
103
103
  Fonemas.fonemas('z').should include('s ee t a')
104
104
  Fonemas.fonemas('é').should include('ee')
105
105
  end
@@ -155,6 +155,9 @@ describe Fonemas do
155
155
  Fonemas.fonemas('hertz')[0].should eql('j e r t s')
156
156
  Fonemas.fonemas('aylwin').should_not include("aa ll l u i n")
157
157
  Fonemas.fonemas('aylwin').should include("ee i l g u i n")
158
+ Fonemas.fonemas('xavier').should_not include('ks a b i ee r')
159
+ Fonemas.fonemas('xavier').should include('j a b i ee r')
160
+
158
161
 
159
162
  end
160
163
 
@@ -182,8 +185,8 @@ describe Fonemas do
182
185
  Fonemas.isConsonante(word,3).should be_false
183
186
  Fonemas._isTonica(word,3).should be_true
184
187
  Fonemas.isTonica(word,3).should be_true
185
-
186
188
  end
187
189
 
188
190
 
191
+
189
192
  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.3
4
+ version: 0.7.4
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-09 00:00:00.000000000 Z
11
+ date: 2014-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler