fonemas 0.2.6 → 0.2.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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjJmNzk4ZTA1YTMxNmZmYTIxZjc2ZWE4YTgwNmE4MGM1MjZhMGE1OA==
4
+ NzE2YjNlYTcwMWZjZWE0MzJhNjYwMjZmMWI3NjM1YWQ5MWI0NTU0Nw==
5
5
  data.tar.gz: !binary |-
6
- N2ZlYjdmYmQ3N2NiMjljMzVlYmE4OGZlZmMwZDVhYTg1NDc5ZjA2OQ==
6
+ MTMwNmM4NzI0MjFkNmQyMWY1OTdkYzhlYzBlNzA0ZDY5MTE4YzY4OQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZjhlMDY4MmVkYzhkNWVjYTZjN2M4MzBhZWQwNjlhN2U4NDMxNTE3MTUxNGZj
10
- NzY4MzUzZDIwNWRiZjlkZmI2NWYzNDMxN2E5NTNmYTA1MDg1ZTdjMTMyNmQ0
11
- Y2RiM2Y5YzhlZmUxOGYyMTgzNGZjOWVjZDFmZWQ1MjYyZDFjYjU=
9
+ ZGM1ZWZjMTk4MWZhZjQzM2U4MjFkMWQ3Zjc4YjdmODgyNDUzMjc4NzFhZTcz
10
+ Y2E3OGQ4YjBiY2JmOGM4ZDMyZTljM2U1YTNmZmIwOWVjYmMxZWZiNmJiZDg4
11
+ NTViMjkyOGE1NDk4N2Q0Y2Y0OTRiYWY0NDVhNWMxYmFmMmVkZWQ=
12
12
  data.tar.gz: !binary |-
13
- NGJjNzkwMTNiYzc3YTA3YTYwNGM1YmNlMWZjMDc0OTJhN2RlZTMzNTM3MjJl
14
- ZGRlNmE0NTVlMzY0NDNmYjA4MmQ1OGUwZDVhZjY2NmIwYTBmODk0ODUxZGJl
15
- MzQ1NzM5MDM1OGJiODg5MGI5Y2Q1YmI5MGYxNDM3ZWViOTczMTE=
13
+ YTZmYzVlNjZiNjQyODZjOWE5NDRjZDMyZmZjMDA0Njk2MjY0ODBhMDljZDcy
14
+ MmYzNTMzODhmNGY1MzJlNjRlNGYwMzAxMjYwOGYwYjdmMGVkMGQwMzQyMTRk
15
+ NWJkOWE5Mjk1NmVlMWMyZWY5ODlkMTJhZWFmMmJkODFkZWMxNzc=
@@ -9,6 +9,11 @@ if ARGV.include?('--list')
9
9
  exit
10
10
  end
11
11
 
12
+ if ARGV.include?('--word')
13
+ puts Fonemas.fonemas(ARGV[1])
14
+ exit
15
+ end
16
+
12
17
  if ARGV.include?('--version')
13
18
  puts Fonemas.version
14
19
  exit
@@ -353,11 +353,12 @@ module Fonemas
353
353
  when 'ü' then
354
354
  fonema << 'u'
355
355
  when 'u' then
356
- if word[i-1] == 'g' and i == 1 and isTonica(word,i+1)
357
- fonema << ['gu']
358
- elsif word[i-1] == 'q' or word[i-1] == 'g'
359
- #nada
360
-
356
+ if word[i-1] == 'g' and i == 1
357
+ if isTonica(word,i+1)
358
+ fonema << ['gu']
359
+ else
360
+ fonema += [['g',''],'u']
361
+ end
361
362
  elsif isTonica(word,i)
362
363
  fonema << 'uu'
363
364
  else
@@ -1,3 +1,3 @@
1
1
  module Fonemas
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
@@ -26,12 +26,8 @@ describe Fonemas do
26
26
  Fonemas.fonemas('guerra').should_not include('ee rr a')
27
27
  Fonemas.fonemas('d').should_not include('')
28
28
  Fonemas.fonemas('dé').should include('d ee')
29
-
30
-
31
-
32
-
33
-
34
-
29
+ Fonemas.fonemas('guatón').should include('g u a t oo n')
30
+ Fonemas.fonemas('gu').should include('g u')
35
31
  for i in Fonemas.fonemas('adskribir')
36
32
  i.should end_with('ii r')
37
33
  end
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.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Bahamondez Honores