fonemas 0.7.1 → 0.7.2

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
- ZjcwMDlhZjc2MzFmMjliNmJiYzQ5YmUwMDJhMjU5NjZiZGQ0YzI4Yg==
4
+ NjlmYjE2YTQxZTExYjMxYTIwZmQ0NjYxZGJhZDRlN2ExYmZhNTllYg==
5
5
  data.tar.gz: !binary |-
6
- YzE5ZTlhMTMwNDBhMzIyMmU1MjQwNjE1ZTJjMmZlMGMwMmE5YTA1Yg==
6
+ ZjhkZTYzMTIxZmMyNTI0ZTQzMTJkMWVkNzgxNWQ4OWRiOWYxY2Y0Zg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MDA4N2M1ZGE3ZTUwNWExNzI3Mjk4OTZhZDQ1NDI4MGE2YjUyNTdhZmExYzI0
10
- ZDM4YjYwZWJhNDhiNTg3MjI0MDgyM2U1ZWM5NDA3NmY4OTJiYzhmMDkxNjRi
11
- MGEyNjVlMmZmN2VkZTE2MWRkYWE0ZDk2ODhkNmI0NjM3MGVhMTg=
9
+ MDNlM2FhOTQ4M2QyYjUwYzM0ZjRjMTQwZGY5MzRiZDVhNTMxNDFiYjFlNjBk
10
+ ZjI0ZTkyMGIzYzI4YWNiMTBjODQ0OGVmZmRhZmJhODY3YTVkMjBhMzE0N2Qy
11
+ MjVhZDVlNGU3MDg2NjE4ZjhhYzc5NWMwOThhNWJmMmU4ZGQxZDE=
12
12
  data.tar.gz: !binary |-
13
- OTY0ZjcxYjlhMWM3YzQ4OWZmNzM2MWE0MWI5MjA2OGE0MDA4N2FhOTc3MGZm
14
- YjRkYTQ3MjhjZGQyYmZhNDhkYjQwODE1ODEwZGE1MTU2ZTM1NWFjMWI0ZTg2
15
- NDY5MWFlZmIzYmFhYmU2YmQ2YmI1OTk4NWQ5M2Q4ZDA4OGM4YmY=
13
+ ZWJiNGIyOGVkY2FjYzBjNGM5YTE4ODA0YjU4YzFjMmRkMWZlYjQyNDkwMDc0
14
+ MDAzMmFmNjJlNGYwNDBmMGRlMmM2ZWFjMWQyMTdjZjE1YzAwODllZTViZDVl
15
+ YzY0MWVjNDUzYmY5YzJiOTFmOGQ1MjY2Mjg1YTQwMzFlMmYyMmU=
@@ -401,7 +401,9 @@ module Fonemas
401
401
  letra = word[i]
402
402
  case letra
403
403
  when 'a','á','ä','ã' then
404
- if isTonica(word,i)
404
+ if isTonica(word,i) and word[i+1] == 'y' and word[i+2] == 'l'
405
+ fonema << 'ee'
406
+ elsif isTonica(word,i)
405
407
  fonema << 'aa'
406
408
  else
407
409
  fonema << 'a'
@@ -560,7 +562,9 @@ module Fonemas
560
562
  fonema << 'u'
561
563
  end
562
564
  when 'w' then
563
- if i == 0 and word[i+1] == 'e'
565
+ if word[i-1] == 'l'
566
+ fonema << [['g','u']]
567
+ elsif i == 0 and word[i+1] == 'e'
564
568
  fonema << ['u']
565
569
  elsif i == 0
566
570
  fonema << ['b']
@@ -580,6 +584,8 @@ module Fonemas
580
584
  when 'y' then
581
585
  if i == word.size - 1
582
586
  fonema << 'i'
587
+ elsif word[i+1] == 'l'
588
+ fonema << 'i'
583
589
  else
584
590
  #fonema << ['ll','lli','i']
585
591
  fonema << 'll'
@@ -1,3 +1,3 @@
1
1
  module Fonemas
2
- VERSION = '0.7.1'
2
+ VERSION = '0.7.2'
3
3
  end
@@ -150,6 +150,8 @@ describe Fonemas do
150
150
 
151
151
  it 'nombres propios proseen su propias reglas' do
152
152
  Fonemas.fonemas('hertz')[0].should eql('j e r t s')
153
+ Fonemas.fonemas('aylwin').should_not include("aa ll l u i n")
154
+ Fonemas.fonemas('aylwin').should include("ee i l g u i n")
153
155
 
154
156
  end
155
157
 
@@ -168,4 +170,5 @@ describe Fonemas do
168
170
  Fonemas.fonemas('web').should include('u ee b')
169
171
  end
170
172
 
173
+
171
174
  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.1
4
+ version: 0.7.2
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-03 00:00:00.000000000 Z
11
+ date: 2014-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler