learn-japanese 0.5.0 → 0.6.0
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 +4 -4
- data/.ruby-version +1 -0
- data/README.md +20 -13
- data/bin/sounds-to-hiragana +1 -1
- data/lib/learn-japanese/cli.rb +6 -0
- data/lib/learn-japanese/data/words.yaml +30 -3
- data/lib/learn-japanese/game/sound-game.rb +15 -7
- data/lib/learn-japanese/version.rb +1 -1
- data/lib/learn-japanese.rb +5 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d63b5f7f7aafa4c249290ead834bad949693cb156bb25f537fba3c0665211ab
|
4
|
+
data.tar.gz: 758f37922314566ac2e95a944428bbd6180de32df90549fad521037548c72cdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cd09b6001f729cbf395e3bf10eadc7e3a8a69a80d3201c1ef41290d3df67b120071cff1435566f857cf2a5678a5df6a59fb53e1e14fb313582cb52f90d0b738
|
7
|
+
data.tar.gz: 6ad71c8b31c20cb5a7196968ef58bf6f32b3f7e719bf7ac3d33d0cb8e2e8f31126166ad80c16ddff7224c6b8fe4a183c2d99d7469b95ebaffb0f7466f9f6eb7d
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7.5
|
data/README.md
CHANGED
@@ -1,25 +1,32 @@
|
|
1
1
|
|
2
2
|
[](https://badge.fury.io/rb/learn-japanese)
|
3
3
|
|
4
|
-
#
|
4
|
+
# Learn Japanese
|
5
5
|
|
6
|
-
`learn-japanese`
|
7
|
-
De momento, sólo se está empezando a implementar la funcionalidad para aprender el Silabario Hiragana, pero poco a poco irá creciendo a medida que yo mismo aprenda más japonés.
|
6
|
+
`learn-japanese` helps us to learn japanese.
|
8
7
|
|
9
|
-
|
10
|
-
1. Debes tener Ruby instalado en tu equipo.
|
11
|
-
2. Abrir un terminal y ejecutar `sudo gem install learn-japanese`, para instalar la herramienta.
|
8
|
+
> WARNING: just only Hiragana (groups 1-4) for now.
|
12
9
|
|
13
|
-
|
10
|
+
Every few week will be grow with more functions... at the same time I'm learning too... I hope.
|
14
11
|
|
15
|
-
|
16
|
-
* Ejecutar `short-answer-game`, para el juego de preguntas donde debemos escribir la respuesta.
|
17
|
-
* Ejecutar `choose-answer-game`, para el juego de preguntas donde debemos elegir la respuesta correcta.
|
18
|
-
* `sounds-to-hiragana`, pasar sonidos a Hiragana.
|
12
|
+
## Installation
|
19
13
|
|
20
|
-
|
14
|
+
1. Install Ruby on your system.
|
15
|
+
2. Open a terminal and run `sudo gem install learn-japanese`, to install the Ruby gem.
|
21
16
|
|
22
|
-
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
* Open a terminal and run `learn-japanese`.
|
20
|
+
|
21
|
+
## Functions or mini-games
|
22
|
+
|
23
|
+
| Function name | Description |
|
24
|
+
| ------------- | ---------------------------------------- |
|
25
|
+
| short-answer | Write the sound associated to the symbol |
|
26
|
+
| choose-answer | Choose the symbol associated to the sound |
|
27
|
+
| sound | Write the sounds and get the word |
|
28
|
+
|
29
|
+
# ANEXO
|
23
30
|
|
24
31
|
## Hiragana
|
25
32
|
|
data/bin/sounds-to-hiragana
CHANGED
data/lib/learn-japanese/cli.rb
CHANGED
@@ -1,19 +1,46 @@
|
|
1
1
|
---
|
2
|
-
- sounds: e
|
3
|
-
hiragana: え
|
4
|
-
spanish: pintura
|
5
2
|
- sounds: ái
|
6
3
|
hiragana: あい
|
7
4
|
spanish: amor
|
5
|
+
- sounds: áka
|
6
|
+
hiragana: あか
|
7
|
+
spanish: rojo)
|
8
8
|
- sounds: áo
|
9
9
|
hiragana: あお
|
10
10
|
spanish: azul
|
11
|
+
- sounds: e
|
12
|
+
hiragana: え
|
13
|
+
spanish: pintura
|
14
|
+
- sounds: éki
|
15
|
+
hiragana: えき
|
16
|
+
spanish: estación de tren
|
11
17
|
- sounds: ié
|
12
18
|
hiragana: いえ
|
13
19
|
spanish: casa
|
14
20
|
- sounds: íi
|
15
21
|
hiragana: いい
|
16
22
|
spanish: bien
|
23
|
+
- sounds: i-e
|
24
|
+
hiragana: いいえ
|
25
|
+
spanish: 'no'
|
17
26
|
- sounds: ué
|
18
27
|
hiragana: うえ
|
19
28
|
spanish: arriba
|
29
|
+
- sounds: ka
|
30
|
+
hiragana: か
|
31
|
+
spanish: mosquito
|
32
|
+
- sounds: kaó
|
33
|
+
hiragana: かお
|
34
|
+
spanish: cara
|
35
|
+
- sounds: ki
|
36
|
+
hiragana: き
|
37
|
+
spanish: árbol
|
38
|
+
- sounds: kíkai
|
39
|
+
hiragana: きかい
|
40
|
+
spanish: máquina, oportunidad
|
41
|
+
- sounds: áisatsu
|
42
|
+
hiragana: あいさつ
|
43
|
+
spanish: salud
|
44
|
+
- sounds: áisatsu wo suru
|
45
|
+
hiragana: あいさつをする
|
46
|
+
spanish: saludar
|
@@ -1,6 +1,7 @@
|
|
1
1
|
|
2
2
|
require_relative '../hiragana'
|
3
3
|
require_relative '../dictionary'
|
4
|
+
require_relative '../debug'
|
4
5
|
require 'colorize'
|
5
6
|
|
6
7
|
module SoundGame
|
@@ -18,16 +19,23 @@ module SoundGame
|
|
18
19
|
word
|
19
20
|
end
|
20
21
|
|
21
|
-
def self.
|
22
|
+
def self.run
|
23
|
+
Debug.puts_line
|
24
|
+
puts "SOUNDS TO HIRAGANA".light_cyan
|
25
|
+
puts "Example: a i => あい (amor - ái)".blue
|
26
|
+
Debug.puts_line
|
27
|
+
|
22
28
|
sounds = "init"
|
23
29
|
until sounds.empty?
|
24
|
-
|
25
|
-
|
26
|
-
sounds = gets.chomp.split
|
30
|
+
print "\nWrite sounds ? ".light_yellow
|
31
|
+
sounds = STDIN.gets.chomp.split
|
27
32
|
word = self.to_hiragana(sounds)
|
28
|
-
|
29
|
-
puts
|
30
|
-
|
33
|
+
print "Hiragana => ".white
|
34
|
+
puts word["hiragana"]
|
35
|
+
print "Spanish => ".white
|
36
|
+
puts word["spanish"]
|
37
|
+
print "Pronounce => ".white
|
38
|
+
puts word["sounds"]
|
31
39
|
end
|
32
40
|
end
|
33
41
|
|
data/lib/learn-japanese.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
require_relative 'learn-japanese/version'
|
3
3
|
require_relative 'learn-japanese/game/choose-answer-game'
|
4
4
|
require_relative 'learn-japanese/game/short-answer-game'
|
5
|
+
require_relative 'learn-japanese/game/sound-game'
|
5
6
|
|
6
7
|
module LearnJapanese
|
7
8
|
|
@@ -25,4 +26,8 @@ module LearnJapanese
|
|
25
26
|
ShortAnswerGame.show_help(level)
|
26
27
|
ShortAnswerGame.new(level).run
|
27
28
|
end
|
29
|
+
|
30
|
+
def self.sound
|
31
|
+
SoundGame.run
|
32
|
+
end
|
28
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: learn-japanese
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Vargas Ruiz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -49,6 +49,7 @@ extensions: []
|
|
49
49
|
extra_rdoc_files: []
|
50
50
|
files:
|
51
51
|
- ".gitignore"
|
52
|
+
- ".ruby-version"
|
52
53
|
- Gemfile
|
53
54
|
- LICENSE
|
54
55
|
- README.md
|
@@ -89,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
90
|
- !ruby/object:Gem::Version
|
90
91
|
version: '0'
|
91
92
|
requirements: []
|
92
|
-
rubygems_version: 3.
|
93
|
+
rubygems_version: 3.1.6
|
93
94
|
signing_key:
|
94
95
|
specification_version: 4
|
95
96
|
summary: Learn Japanese (UNDER DEVELOPMENT)
|