fonemas 0.0.11 → 0.0.12

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
- NGRjNmZjZjVjMjg0YTE2NDFlMGEzOGU2ZmU1ZTZlZjMyZTU4MDhiMQ==
4
+ NTA4MjdjNWNlYzRhMTNiYWQyZDc4MzE0ZDhiYjcyZDU2ZWUyZDVjMQ==
5
5
  data.tar.gz: !binary |-
6
- MDJlNzM3ZjYwYWJjZTRkN2Y0MjhkY2Y1ZGQyYWFiNzkxYjlhY2UwNA==
6
+ YTg5MjA0ZDgzM2MzYTkxNzk0OGU1MDM3NjcwZjQwZGZkMGQ2ZjU3MA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MmViZTJhNjI4ZDMwMWRmMjY2MzlhMTI5YTNiMWMwY2JmNzQxNTI5ZTc5ZGMw
10
- MTBhOThjYmQxYjM4NDQ2OTZhNWQ4ZmVmNjQ2NmM3YjU2Yzg5ZDljYjBjODgy
11
- ZWY0NzU1NmUxNDBhOTc0ZmY2MzNlYmIwOGJlMTYwM2JhOWQ1ZTQ=
9
+ MzNkNmIzYTI3Nzc2YjA0YTNkNDdhYmY5ZDA1ZDcxYzFhMmRhZjNhMDMxNjIy
10
+ ZTJhNzY1ZjdlYWQyYzJkZjBmY2Q0OGZmMzQwMDU1ODAxMmQ1MDJhODRlMjNh
11
+ OTFiZWU4Yzc3MjA3ODgxMzFhMDQ4ZjU0NTVhZmU0MDk2NjQ3NTk=
12
12
  data.tar.gz: !binary |-
13
- NGQ4ZDdlMzVkZTBmYzYwY2RjYzk2ZThiZTJkNTQ4NjgyZTdjZDY1YTRkMzk4
14
- MDE3NjFjZWExMjdjYWIzYjNkYzA2NjM3YTU4ZjdhOWZkYTFmMmJiYjQ3ODMx
15
- ODE0MzZlOTYwNDMzMzViYTlkMDI1YTVlZjg3MWVlODM1N2FhNGQ=
13
+ Y2E5MzI1ZGYwOGI2Y2RlNDNiZjg3N2Q1MmMyMzU1MjUzNWUxZjBlYTc4NTUz
14
+ NmQ2OGMwYjQ0Zjk3OGIxYmViZGQ3ZjQzYmMxMTA1ZDFlNTBiODAxN2MyZTFm
15
+ ZjhmYzM5MWU3ODE2OGE3NjNjYzA2MTdhYzgwNTEzNWYzMzU5MmU=
data/lib/fonemas.rb CHANGED
@@ -38,6 +38,7 @@ module Fonemas
38
38
  p = es.hyphenate(w)
39
39
  #puts es.visualize(w)
40
40
  hh = es.visualize(w).split("-")
41
+ #puts hh.size
41
42
  if word =~ /áéíóú/
42
43
  #acento ya existe en otra silaba
43
44
  return false
@@ -56,11 +57,18 @@ module Fonemas
56
57
  #termina en n s y vocal y no tiene tilde
57
58
  #por lo tanto es grave
58
59
  # puts "#{lastVocal(w,p[0])} == #{word[i]} #{word[i].class.name}"
60
+ # puts "#{i < p[0]} - #{lastVocal(w,p[0]) == word[i]}"
59
61
  if i < p[0] and lastVocal(w,p[0]) == word[i]
60
62
  return true
61
63
  else
62
64
  return false
63
65
  end
66
+ else
67
+ if i < p[0] and lastVocal(w,p[0]) == word[i]
68
+ return false
69
+ else
70
+ return true
71
+ end
64
72
  end
65
73
  elsif hh.size >= 3
66
74
  #puts hh.join("-")
@@ -1,3 +1,3 @@
1
1
  module Fonemas
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
@@ -7,6 +7,7 @@ describe Fonemas do
7
7
  Fonemas.fonemas('ungüento')[0].should eql("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 D aa d')
10
11
 
11
12
  for i in Fonemas.fonemas('adskribir')
12
13
  i.should end_with('ii r')
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.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Bahamondez Honores