fonemas 0.7.8 → 0.7.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 27d7a808e4714fd83286a5b87d9558feb01b19f3
4
- data.tar.gz: e8dfa8c10872a54c8c1955d95aad3cec0cfc5378
3
+ metadata.gz: ec0a455137b78115386830309c0e990862d7b41b
4
+ data.tar.gz: b2c6625877649e1f578cca98fe1374d92f5faa5a
5
5
  SHA512:
6
- metadata.gz: 84986ebf5b5c8ea05ac598464999e57ff1131c68a4ec5487b1e968d4c80ee4c7da0ecd4e5d589f8ff7ae0c52d059a19548535048a49ca61d01b7d62ae5f59834
7
- data.tar.gz: 130293b5e680006ce3082b2396c1826217b1713d4fef14929df71ddac29dea7a43686cc0de2080160bf303d995b71b95ab0c802a4f5d80cfcc4571761348dd8a
6
+ metadata.gz: e1aac3977295a87128e7d0a8b84b397a6a669e007ae70978c96406c26b3053bfcabdde49a81db1a47d95d0a8c02fc6903c0c61b3db367e856b7c5bfcda88b1ba
7
+ data.tar.gz: 770da8254f183ce6cc71aa7a495f3ff677aa23a28c37194825a692fc3b5a76fc572f88530ffc3e89bded92734d5c89a78cfd90eaed4a95a686f9abdd208d4610
@@ -377,6 +377,9 @@ module Fonemas
377
377
  return nil
378
378
  end
379
379
 
380
+ def self.limpiarVocalesDuplicadas(word)
381
+ word.gsub(/a+/,'a').gsub(/e+/,'e').gsub(/i+/,'i').gsub(/o+/,'o').gsub(/u+/,'u')
382
+ end
380
383
 
381
384
  def self.fonemas(word)
382
385
  if word.include? ' '
@@ -390,6 +393,9 @@ module Fonemas
390
393
  return self.nombres(word) unless self.nombres(word).nil?
391
394
  return self.extranjeras(word) unless self.extranjeras(word).nil?
392
395
  word = word.gsub(/'/,'')
396
+
397
+ word = limpiarVocalesDuplicadas(word)
398
+
393
399
  if word.size == 1
394
400
  return fonemaLetra(word)
395
401
  end
@@ -1,3 +1,3 @@
1
1
  module Fonemas
2
- VERSION = '0.7.8'
2
+ VERSION = '0.7.9'
3
3
  end
@@ -58,7 +58,7 @@ describe Fonemas do
58
58
 
59
59
 
60
60
  end
61
-
61
+
62
62
  it 'soporta mayúsculas acentuadas' do
63
63
  Fonemas.fonemas('África').should include('aa f r i k a')
64
64
  end
@@ -204,12 +204,15 @@ describe Fonemas do
204
204
 
205
205
  end
206
206
 
207
+ it 'palabras con letras repetidas' do
208
+ Fonemas.fonemas('aaah').should eql(Fonemas.fonemas('aah'))
209
+ end
210
+
207
211
  it 'debe caerse con guiones entre medio' do
208
212
 
209
213
  expect { Fonemas.fonemas('a-b') }.to raise_error
210
214
 
211
-
212
215
  end
213
216
 
214
217
 
215
- end
218
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fonemas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.8
4
+ version: 0.7.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Bahamondez Honores