fonemas 0.2.7 → 0.2.8

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
- NzE2YjNlYTcwMWZjZWE0MzJhNjYwMjZmMWI3NjM1YWQ5MWI0NTU0Nw==
4
+ NjU4OGVjOTdlMDQxODlkYzNjZTc3MjBhMDdhMDVhODE3ZDNhOTdmZg==
5
5
  data.tar.gz: !binary |-
6
- MTMwNmM4NzI0MjFkNmQyMWY1OTdkYzhlYzBlNzA0ZDY5MTE4YzY4OQ==
6
+ ZTg3NWFmOTI0MWY3MWZjODQzZTMxZWM3OWVkMzA1MmM4NjIwZmM1NQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZGM1ZWZjMTk4MWZhZjQzM2U4MjFkMWQ3Zjc4YjdmODgyNDUzMjc4NzFhZTcz
10
- Y2E3OGQ4YjBiY2JmOGM4ZDMyZTljM2U1YTNmZmIwOWVjYmMxZWZiNmJiZDg4
11
- NTViMjkyOGE1NDk4N2Q0Y2Y0OTRiYWY0NDVhNWMxYmFmMmVkZWQ=
9
+ YTVlNGFjNGQyZDkwZmViYjNkNTU2NjJhNWM2YWFlMTllYmY5YTVlZThhM2Rl
10
+ YzIxY2MzN2IyMzc5MDJkMjI1NmJlYzU2Y2Y0MjIxZTAxY2ZkNDViNWQyNGZl
11
+ MWM3NDFhMGY5OTkzYWM1NGJjM2EwZGI4OTExZTgyYzJkYzdkNTQ=
12
12
  data.tar.gz: !binary |-
13
- YTZmYzVlNjZiNjQyODZjOWE5NDRjZDMyZmZjMDA0Njk2MjY0ODBhMDljZDcy
14
- MmYzNTMzODhmNGY1MzJlNjRlNGYwMzAxMjYwOGYwYjdmMGVkMGQwMzQyMTRk
15
- NWJkOWE5Mjk1NmVlMWMyZWY5ODlkMTJhZWFmMmJkODFkZWMxNzc=
13
+ NjFhZTNjY2ZlOGJlZWMzNGZkMzVlZDRiNjcyODI1YTI4ODUwOGY0MjNiZTZh
14
+ MDcxMmM5OGIxNWFjNWQ5Mjk2ZjY0YjMxNDgwNDdjMTQ5OTBmODJjYzY4MzUw
15
+ MWYwM2QzMjUzYmNjZTU2MjA2N2RmMGVmMThkNWI4MzRhZTg4YWI=
data/lib/fonemas.rb CHANGED
@@ -193,6 +193,7 @@ module Fonemas
193
193
 
194
194
 
195
195
  def self.fonemas(word)
196
+ word = word.gsub(/'/,'')
196
197
  if word.size == 1
197
198
  return fonemaLetra(word)
198
199
  end
@@ -281,7 +282,7 @@ module Fonemas
281
282
  when 'f' then
282
283
  fonema << 'f'
283
284
  when 'g' then
284
- if word[i+1] == 'u' and i == 0
285
+ if word[i+1] == 'u' and i == 0 and isTonica(word,i+2)
285
286
  #nada
286
287
 
287
288
  elsif word[i+1] == 'e' or word[i+1] == 'i'
@@ -353,12 +354,8 @@ module Fonemas
353
354
  when 'ü' then
354
355
  fonema << 'u'
355
356
  when 'u' then
356
- if word[i-1] == 'g' and i == 1
357
- if isTonica(word,i+1)
357
+ if word[i-1] == 'g' and i == 1 and isTonica(word,i+1)
358
358
  fonema << ['gu']
359
- else
360
- fonema += [['g',''],'u']
361
- end
362
359
  elsif isTonica(word,i)
363
360
  fonema << 'uu'
364
361
  else
@@ -1,3 +1,3 @@
1
1
  module Fonemas
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
@@ -27,7 +27,8 @@ describe Fonemas do
27
27
  Fonemas.fonemas('d').should_not include('')
28
28
  Fonemas.fonemas('dé').should include('d ee')
29
29
  Fonemas.fonemas('guatón').should include('g u a t oo n')
30
- Fonemas.fonemas('gu').should include('g u')
30
+ Fonemas.fonemas('gu').should include('gg u')
31
+ Fonemas.fonemas('guagua').should include('gu aa g u a')
31
32
  for i in Fonemas.fonemas('adskribir')
32
33
  i.should end_with('ii r')
33
34
  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.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Bahamondez Honores