fonemas 0.7.6 → 0.7.7
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 +8 -8
- data/lib/fonemas.rb +32 -12
- data/lib/fonemas/version.rb +1 -1
- data/spec/fonemas/fonema_spec.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjU3YjM5ZjNkYWIyYTdjZjJmMWMxZmRjMmQ2MzY4M2UyNThjMzA3Yw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
M2VmNDQ3ZTY3NDBhOWUyOWNiZTk2ZGRlZDNmMGZjZWIyOThmNWY0YQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODIyMGJlZjg0ZmFjOWZiMjhlNDdhYWU4MjM4NmRjNzBhYWM1NmQ0MWE5NTZj
|
10
|
+
ZmM2Y2Y4MDVjNjFjNTlhYjZhN2RkZGVlYzI0MmZhODM0OTliM2YxMDljODg1
|
11
|
+
YjNlNTlkNDljYmRhYTMxM2FlZjg5ODUxMDc2OTc5ODQ4MTExNjg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWExMjlhODgyMmY4NjM0NzlmYjMxOTI2OTMzOWE1OWZmMDEzYTBjOTE2Y2Uz
|
14
|
+
N2ViNzMyYmU1YjI2OGJmNmIyY2I5N2ZlZWViZTMxOTliMjkzM2EzYjVjMTFj
|
15
|
+
NWY1MGY5ODk1OWU5NmZmNjk2OTEyZGVhZmFmNTdmZDJkMGFiY2E=
|
data/lib/fonemas.rb
CHANGED
@@ -457,12 +457,18 @@ module Fonemas
|
|
457
457
|
else
|
458
458
|
fonema << 'd'
|
459
459
|
end
|
460
|
-
when 'e','
|
461
|
-
if
|
462
|
-
fonema << '
|
460
|
+
when 'e','ë' then
|
461
|
+
if word[i-1] == 'n' and word[i-2] == 'o' and word[i-3] == 'h' and word[i-4] == 'p'
|
462
|
+
fonema << ''
|
463
463
|
else
|
464
|
-
|
464
|
+
if isTonica(word,i)
|
465
|
+
fonema << 'ee'
|
466
|
+
else
|
467
|
+
fonema << 'e'
|
468
|
+
end
|
465
469
|
end
|
470
|
+
when 'é' then
|
471
|
+
fonema << 'ee'
|
466
472
|
when 'f' then
|
467
473
|
fonema << 'f'
|
468
474
|
when 'g' then
|
@@ -492,10 +498,14 @@ module Fonemas
|
|
492
498
|
end
|
493
499
|
#nada
|
494
500
|
when 'i','í' then
|
495
|
-
if
|
496
|
-
fonema << '
|
501
|
+
if word[i+1] == 'p' and word[i+2] == 'h'
|
502
|
+
fonema << [['aa','i']]
|
497
503
|
else
|
498
|
-
|
504
|
+
if isTonica(word,i)
|
505
|
+
fonema << 'ii'
|
506
|
+
else
|
507
|
+
fonema << 'i'
|
508
|
+
end
|
499
509
|
end
|
500
510
|
when 'j' then
|
501
511
|
if i == 0 and word[i+1] == 'o' and (word[i+2] == 'ã' or word[i+2] == 'h')
|
@@ -521,14 +531,24 @@ module Fonemas
|
|
521
531
|
fonema << 'n'
|
522
532
|
when 'ñ' then
|
523
533
|
fonema << 'nh'
|
524
|
-
when 'o'
|
525
|
-
if
|
526
|
-
fonema << 'oo'
|
527
|
-
else
|
534
|
+
when 'o' then
|
535
|
+
if word[i-1] == 'h' and word[i-2] == 'p'
|
528
536
|
fonema << 'o'
|
537
|
+
else
|
538
|
+
if isTonica(word,i)
|
539
|
+
fonema << 'oo'
|
540
|
+
else
|
541
|
+
fonema << 'o'
|
542
|
+
end
|
529
543
|
end
|
544
|
+
when 'ó' then
|
545
|
+
fonema << 'oo'
|
530
546
|
when 'p' then
|
531
|
-
|
547
|
+
if word[i+1] == 'h'
|
548
|
+
fonema << 'f'
|
549
|
+
else
|
550
|
+
fonema << 'p'
|
551
|
+
end
|
532
552
|
when 'q' then
|
533
553
|
fonema << 'k'
|
534
554
|
when 'r' then
|
data/lib/fonemas/version.rb
CHANGED
data/spec/fonemas/fonema_spec.rb
CHANGED
@@ -176,10 +176,11 @@ describe Fonemas do
|
|
176
176
|
Fonemas.fonemas('web').should include('g u ee b')
|
177
177
|
Fonemas.fonemas('will').should include('g u i l')
|
178
178
|
Fonemas.fonemas('william').should include('g u i l i aa m')
|
179
|
-
|
180
|
-
|
181
179
|
end
|
182
180
|
|
181
|
+
it 'palabras gringas' do
|
182
|
+
Fonemas.fonemas('iphone').should include('aa i f o n')
|
183
|
+
end
|
183
184
|
|
184
185
|
|
185
186
|
it 'palabras esdrújulas' do
|
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.
|
4
|
+
version: 0.7.7
|
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:
|
11
|
+
date: 2015-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|