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 +8 -8
- data/lib/fonemas.rb +8 -0
- data/lib/fonemas/version.rb +1 -1
- data/spec/fonemas/fonema_spec.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTA4MjdjNWNlYzRhMTNiYWQyZDc4MzE0ZDhiYjcyZDU2ZWUyZDVjMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTg5MjA0ZDgzM2MzYTkxNzk0OGU1MDM3NjcwZjQwZGZkMGQ2ZjU3MA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzNkNmIzYTI3Nzc2YjA0YTNkNDdhYmY5ZDA1ZDcxYzFhMmRhZjNhMDMxNjIy
|
10
|
+
ZTJhNzY1ZjdlYWQyYzJkZjBmY2Q0OGZmMzQwMDU1ODAxMmQ1MDJhODRlMjNh
|
11
|
+
OTFiZWU4Yzc3MjA3ODgxMzFhMDQ4ZjU0NTVhZmU0MDk2NjQ3NTk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
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("-")
|
data/lib/fonemas/version.rb
CHANGED
data/spec/fonemas/fonema_spec.rb
CHANGED
@@ -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')
|