fonemas 0.7.5 → 0.7.6

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
- MDAxZTA4Y2MyM2RhOTdlN2Q4NjM4MzhjZTIxMGY2NjdlNzg2OTU3MQ==
4
+ NmZiNmJkN2Y0MzFiNTczNTllNDZjM2Y1ZTdmNGFhM2UzOGU3NTQyZA==
5
5
  data.tar.gz: !binary |-
6
- ZTM3YjNiZDRlYWRlZjExNmFmZDJmODY3YTA3OGJiMGNkZTNkYzUxNA==
7
- !binary "U0hBNTEy":
6
+ OGRhNTM0ZmJiN2Y4NDZiYjc1ZTUyMGNiNTIyNWE4ZDljY2IzZWM5Zg==
7
+ SHA512:
8
8
  metadata.gz: !binary |-
9
- OTE3NDIxYjNhNzRmNzVhOTYyYTk3ZGQ3OGI1YWFlNDQyNjE2MDk2NDI0ODQ4
10
- MmY1NTA4NjBlMWFjMjZjYzA2MGFkOTcyNGMxZDZiYTY1NDg4ZTQxYzMxNjk0
11
- MWE4ZDM2NDYxZTMxMDhmYWMwODg4NmUxMjgzYzY4MTUwYWRjODg=
9
+ MDEwMjVkNzY1YTE5ZDZmYjc5NDNmOWUyY2IwZjg1NTI4NWI0YjQyMDAwMjE0
10
+ Yzk0Y2ZjZDcxNDM2NTU4ZmNmM2JmMGEyMmM4OTRiZWYzOWNlMTc0NWI3NGVk
11
+ NGEyYjkxYTAwNzYzNmE4OGNlZWU4Y2M0NzA4YmRhZjM3MGJkNjI=
12
12
  data.tar.gz: !binary |-
13
- YTM3OGZkOGJmZDA2OTY5ZjJhMmU2Njc1OTQ4OTI5YzI0MmE0MDllMDhkYTIx
14
- OGM0MjViMGZmZjU4MzBkMmVjMGJkMjg1NzJiZDdjOTYwM2NlNGFlNzk3YTY5
15
- MmM3MjU1NDUzMDAzM2U3ZTQ4YTg3ODhmZDJiZmRmODVkNzIzY2M=
13
+ ZWM2MGI5M2Y4NDUzNjU4ZDBiOWIwMjljYzZjOTIwMzlmY2E3ZGJmYTljZjg1
14
+ ZTk4MzUwZWQwZGQ5NTRjOTk4Nzc3MTUzMWFjZjM4MzRmZTc3NDA0MWI4NGQ4
15
+ ZTBiNzYwYzA0NmFmNmNkYWM2MTA1NTAzMTQ5NmNkMjAzNTgzNTM=
@@ -508,8 +508,13 @@ module Fonemas
508
508
  when 'l' then
509
509
  fonema << 'l'
510
510
  when 'll' then
511
+ if i == word.length - 1
512
+ fonema << 'l'
513
+ else
514
+ fonema << ['ll','l']
515
+ end
511
516
  #fonema << ['ll','lli','i']
512
- fonema << ['ll','i']
517
+
513
518
  when 'm' then
514
519
  fonema << 'm'
515
520
  when 'n' then
@@ -569,12 +574,12 @@ module Fonemas
569
574
  fonema << 'u'
570
575
  end
571
576
  when 'w' then
572
- if word[i-1] == 'l'
577
+ if word[i-1] == 'l' or i == 0
573
578
  fonema << [['g','u']]
574
- elsif i == 0 and word[i+1] == 'e'
575
- fonema << ['u']
576
- elsif i == 0
577
- fonema << ['b']
579
+ #elsif i == 0 and word[i+1] == 'e'
580
+ # fonema << ['u']
581
+ #elsif i == 0
582
+ # fonema << ['b']
578
583
  elsif word[i-1] == 'o'
579
584
  fonema << 'u'
580
585
  elsif word[i+1] == 'i'
@@ -1,3 +1,3 @@
1
1
  module Fonemas
2
- VERSION = '0.7.5'
2
+ VERSION = '0.7.6'
3
3
  end
@@ -135,9 +135,9 @@ describe Fonemas do
135
135
 
136
136
  it 'identificar sílaba tónica' do
137
137
  word = Fonemas.separar('acaban')
138
- Fonemas.isTonica(word,0).should be_false
139
- Fonemas.isTonica(word,2).should be_true
140
- Fonemas.isTonica(word,4).should be_false
138
+ Fonemas.isTonica(word,0).should eql(false)
139
+ Fonemas.isTonica(word,2).should eql(true)
140
+ Fonemas.isTonica(word,4).should eql(false)
141
141
 
142
142
  end
143
143
 
@@ -172,19 +172,25 @@ describe Fonemas do
172
172
 
173
173
  end
174
174
 
175
- it 'test web' do
176
- Fonemas.fonemas('web').should include('u ee b')
175
+ it 'letra w' do
176
+ Fonemas.fonemas('web').should include('g u ee b')
177
+ Fonemas.fonemas('will').should include('g u i l')
178
+ Fonemas.fonemas('william').should include('g u i l i aa m')
179
+
180
+
177
181
  end
178
182
 
183
+
184
+
179
185
  it 'palabras esdrújulas' do
180
186
  silabas = Fonemas.silabar('llamémosla')
181
187
  silabas.split("-").size.should eql(4)
182
188
  word = Fonemas.separar('llamémosla')
183
189
  word[0].should eql('ll')
184
190
  word[3].should eql('é')
185
- Fonemas.isConsonante(word,3).should be_false
186
- Fonemas._isTonica(word,3).should be_true
187
- Fonemas.isTonica(word,3).should be_true
191
+ Fonemas.isConsonante(word,3).should eql(false)
192
+ Fonemas._isTonica(word,3).should eql(true)
193
+ Fonemas.isTonica(word,3).should eql(true)
188
194
  end
189
195
 
190
196
  it 'debe soportar palabras parciales' 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.5
4
+ version: 0.7.6
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-07-31 00:00:00.000000000 Z
11
+ date: 2014-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -142,11 +142,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  version: '0'
143
143
  requirements: []
144
144
  rubyforge_project:
145
- rubygems_version: 2.0.3
145
+ rubygems_version: 2.2.2
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: Lista todas las pronunciaciones posibles para una palabra en Chileno
149
149
  test_files:
150
150
  - spec/fonemas/fonema_spec.rb
151
151
  - spec/spec_helper.rb
152
- has_rdoc: