fonemas 0.6.3 → 0.7.0

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
- NWRmNzM2OGE2NmJiYzQ3MjIwMTJhY2JkYTM2NzVhYmE2NGM4YzliYw==
4
+ MTk5MTgwMzgwNzQ1YzQyNzMyNzZkYmJjMzE2ZDhmOTY0ZjAwZmM1NQ==
5
5
  data.tar.gz: !binary |-
6
- OTBmZWNiYzEyNGU4ZTU5NTRlMzA5N2IxYmMwN2YzZWMzOTlmMzRiYg==
6
+ ZWFmODQ5M2QyMmJhZmJiYzVkNDI2OGU2MmE0MzAyMTM2MTM5YzlmYw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NzU0NDQ3ZTQyZjM3ZDYzNGRlOGE0YTc5NTNhZWIxM2IxNWVkMWYyOWJiNTMz
10
- MGNlYWMyODdjNGU0ODY5ZWVjNjcyNmY3MjAwODkzMjAwN2MyOTM0ODRhMGNk
11
- YjBmZTY3MjA2Njc3YTYxNTk3OGIxYjg0NjE2MTQxZDA1YjFmOWE=
9
+ N2I3NmRmMWM3NTgzZGI4NmMxZjFhN2I4MDI3MTMyMzg4MGEwM2I0NzNlNjUy
10
+ ZjY2NDZhNTI4YzQxNjAwNmY0NzhjNGNlMjE1YTJhYTFmNTdlNWZkMmJlM2E0
11
+ Njc0NTBlOTFlNjUyZDg1N2JjM2I0ZDFmZDhlZDExNDQ4YTNlMjk=
12
12
  data.tar.gz: !binary |-
13
- MThkN2Y2NjY4MzZiMmU0YjAyYjExMjk3OWQyYzM5NWJiOGYwYzcxZGMyZDcw
14
- Y2YwNzlhNzE5ODk5ZWIyYjFkYTQ0Yjc0MTAxZWU4OGI0Yjc4YjU5ODA0OWE4
15
- ZDZiNDJmOTFhNDdhZjBiNDgzNTJjZjFlMjk4MTZjYTJjYTkwNDQ=
13
+ YTJiNTk4YzVkMWQ4NTA0Y2MwYzg2MzIwNDk1ZDM2ZjJhMjM0NTk1OGJiYjI3
14
+ ZmZhYzM2OTFmNmRkMzhiYTM0MGJkZmZjMDZlMTRmODYzZGRmNzgwYzA3OWIy
15
+ NjFlNzllMDYwNjI5NWU0Nzk4ZmRjOGMyZjQ2OTM5MjU1ZjU4N2I=
data/lib/fonemas.rb CHANGED
@@ -408,18 +408,18 @@ module Fonemas
408
408
  end
409
409
  when 'b','v' then
410
410
  if isVocal(word,i-1) and (word[i+1] == 'b' or word[i+1] == 'v')
411
- fonema << ['bb','']
411
+ fonema << ['b','']
412
412
  elsif i == 0 and isVocal(word,i+1)
413
413
  if word[i+1] == 'u' and isDiptongo(word,i+1,i+2)
414
- fonema << ['bb','b','g']
414
+ fonema << ['b','g']
415
415
  else
416
- fonema << ['bb','b']
416
+ fonema << ['b']
417
417
  end
418
418
  elsif word[i+1] == 'u' and isDiptongo(word,i+1,i+2)
419
419
  if entreVocales(word,i)
420
420
  fonema << ['b','g','']
421
421
  else
422
- fonema << ['bb','g']
422
+ fonema << ['b','g']
423
423
  end
424
424
  elsif isFricativa(word,i-1)
425
425
  fonema << 'b'
@@ -428,7 +428,7 @@ module Fonemas
428
428
  elsif entreVocales(word,i)
429
429
  fonema << ['b','']
430
430
  else
431
- fonema << 'bb'
431
+ fonema << 'b'
432
432
  end
433
433
  when 'c' then
434
434
  if word[i+1] == 'e' or word[i+1] == 'i' or word[i+1] == 'í' or word[i+1] == 'é'
@@ -446,11 +446,11 @@ module Fonemas
446
446
  end
447
447
  when 'd' then
448
448
  if i == 0 and isVocal(word,i+1)
449
- fonema << ['dd','d']
449
+ fonema << ['d']
450
450
  elsif entreVocales(word,i) or i == word.size-1
451
451
  fonema << ['d','']
452
452
  elsif entreVocalyConsonante(word,i)
453
- fonema << ['dd','d']
453
+ fonema << ['d']
454
454
  else
455
455
  fonema << 'd'
456
456
  end
@@ -561,7 +561,7 @@ module Fonemas
561
561
  end
562
562
  when 'w' then
563
563
  if i == 0
564
- fonema << ['b','bb']
564
+ fonema << ['b']
565
565
  elsif word[i-1] == 'o'
566
566
  fonema << 'u'
567
567
  elsif word[i+1] == 'i'
@@ -665,7 +665,7 @@ module Fonemas
665
665
  def self.lista_de_fonemas
666
666
  phonelist = ['SIL']
667
667
  phonelist += %w{a e i o u aa ee ii oo uu}
668
- phonelist += %w{bb b d e f g i j k l m n o p rr r s t u ks k ch dd ll nh}
668
+ 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}
669
669
  phonelist.uniq
670
670
  end
671
671
 
@@ -1,3 +1,3 @@
1
1
  module Fonemas
2
- VERSION = '0.6.3'
2
+ VERSION = '0.7.0'
3
3
  end
@@ -7,9 +7,9 @@ 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 dd aa d')
10
+ Fonemas.fonemas('bondad').should include('b o n d aa d')
11
11
  Fonemas.fonemas('gestión').should include('j e s t i oo n')
12
- Fonemas.fonemas('abstraer').should include('a bb s t r a ee r')
12
+ Fonemas.fonemas('abstraer').should include('a b s t r a ee r')
13
13
  Fonemas.fonemas('presidida').should include('p r e s i ii d a')
14
14
  Fonemas.fonemas('guerra').should include('g ee rr a')
15
15
  Fonemas.fonemas('buitre').should include('g u ii t r e')
@@ -18,10 +18,10 @@ describe Fonemas do
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('dd 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('bb u ee n o')
24
- Fonemas.fonemas('obvio').should include('oo bb 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
26
  Fonemas.fonemas('guerra').should_not include('ee rr a')
27
27
  Fonemas.fonemas('d').should_not include('')
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.6.3
4
+ version: 0.7.0
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-01-16 00:00:00.000000000 Z
11
+ date: 2014-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler