fonemas 0.3.7 → 0.3.8

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
- ZDIwNzliZjY2ZTBkMTQ1MmY4OGFlZGMwZGM4OGNiOTVlNWM0NjA4Yw==
4
+ ZDZiMmY3NTk1Y2IyYmRlYTIyYmVhNTc4ZWMyYWJkNTJkNTZiZjA0NA==
5
5
  data.tar.gz: !binary |-
6
- MDlkMWNkNDdmOTdkYzQ1Yzk3NGIxODlhOTBiNjU2NGMxOWMxYzQ2ZQ==
6
+ YTdiNmU0MzNmOTlhMDQxN2IzYmNkZGI0NmJhNDFhYjUwNTUxMGU1MA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NzFjNzNjZGZkMjRmMDBhZDIwMjk0YzhhMjFhZTQ1MTgwNGU2MjZkMGFjYWM1
10
- MjYxYWI0M2JmNzk1YjA3NzYzNzZjMjA4MzM1ZmY2NDdhYzBiZDc5YzYzNDEz
11
- NjA5MjQ3MDUzYzQ2MzRkMzljZDBlMjRlZDA2ODMwOGZkMWRlZjI=
9
+ ZGIwN2NlMWViMjhkMGJhZWUxMjUzNjVlNWQ1YTM5NGQ5NDY2MDhjNTJiNjJj
10
+ NzkzYjk3NjQyYWFlMGM4ZGI4MzZkNTE2ZDI0NWVhNjgzNTI0Y2M0ZmY2NGM5
11
+ Mjg0MGNmZjI4ZTlhZmYxY2I4N2QzMTJlNmQ1OTlhYTc0YzMzZGE=
12
12
  data.tar.gz: !binary |-
13
- ZWQyMTA3Nzk3MzIxODAzOWYwOTk1YWFiMDVjMWFiMzM1MzZmMWUwZDA2ZDI1
14
- YzY3NjRhYmFlMmY3Y2M2ODQzNzY1ODk0ZjgzN2EwZWRjODU1YjdhYmYxYzZm
15
- YzE4YTU4MmRhMjVjMDcyYjczNzM2OGY0YWQ3Y2Q3ODNkNmJmODA=
13
+ ODQxZDViMDg2ZTE4ZmEzYTVlOTFiYTlkODZmOGRlYzIyZDU5OTE5YjEzZjVm
14
+ NDM0YzI2YTNjMDBjZDQwYzlmNTc1ZDA0Zjg1MzM2YWFmM2ZjNGMzNGExM2E2
15
+ NzQ3MWQ3Mzg3NGMzZTBjMmQyYWJjMDYxZDFhYzUyYjUyNTU1NWQ=
data/lib/fonemas.rb CHANGED
@@ -367,7 +367,9 @@ module Fonemas
367
367
  when 'ü' then
368
368
  fonema << 'u'
369
369
  when 'u','ú' then
370
- if word[i-1] == 'g' and i == 1 and isTonica(word,i+1)
370
+ if word[i-1] == 'q'
371
+ #nada
372
+ elsif word[i-1] == 'g' and i == 1 and isTonica(word,i+1)
371
373
  fonema << ['gu']
372
374
  elsif isTonica(word,i)
373
375
  fonema << 'uu'
@@ -479,7 +481,7 @@ module Fonemas
479
481
  def self.lista_de_fonemas
480
482
  phonelist = ['SIL']
481
483
  phonelist += %w{a e i o u aa ee ii oo uu}
482
- phonelist += %w{bb b d e f g i j k l m n o p q rr r s t u ks k gu ch dd gg ll nh}
484
+ phonelist += %w{bb b d e f g i j k l m n o p rr r s t u ks k gu ch dd gg ll nh}
483
485
  phonelist.uniq
484
486
  end
485
487
 
@@ -1,3 +1,3 @@
1
1
  module Fonemas
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.8"
3
3
  end
@@ -29,6 +29,9 @@ describe Fonemas do
29
29
  Fonemas.fonemas('guatón').should include('g u a t oo n')
30
30
  Fonemas.fonemas('gu').should include('gg u')
31
31
  Fonemas.fonemas('guagua').should include('gu aa g u a')
32
+ Fonemas.fonemas('joão').should include('ll o aa o')
33
+ Fonemas.fonemas('johan').should include('ll oo j a n')
34
+ Fonemas.fonemas('adquirir').should include('a d k i r ii r')
32
35
  for i in Fonemas.fonemas('adskribir')
33
36
  i.should end_with('ii r')
34
37
  end
@@ -92,8 +95,6 @@ describe Fonemas do
92
95
  Fonemas.fonemas('y').should include('ll ee')
93
96
  Fonemas.fonemas('z').should include('s ee t a')
94
97
  Fonemas.fonemas('é').should include('ee')
95
- Fonemas.fonemas('joão').should include('ll o aa o')
96
- Fonemas.fonemas('johan').should include('ll oo j a n')
97
98
  end
98
99
 
99
100
  it 'test diptongos' do
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.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Bahamondez Honores