pokemon_name_generator 0.1.1 → 0.2.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/README.md +21 -7
- data/data/pokemon.txt +905 -0
- data/lib/pokemon_name_generator/algorithm/factory.rb +33 -0
- data/lib/pokemon_name_generator/algorithm/markov.rb +68 -0
- data/lib/pokemon_name_generator/algorithm/naive.rb +32 -0
- data/lib/pokemon_name_generator/algorithm.rb +9 -0
- data/lib/pokemon_name_generator/cli/commands/generate.rb +37 -0
- data/lib/pokemon_name_generator/cli/commands/test.rb +59 -0
- data/lib/pokemon_name_generator/cli/commands/version.rb +15 -0
- data/lib/pokemon_name_generator/cli/commands.rb +4 -74
- data/lib/pokemon_name_generator/corpus/data.rb +19 -0
- data/lib/pokemon_name_generator/corpus/names.rb +9 -0
- data/lib/pokemon_name_generator/corpus.rb +4 -44
- data/lib/pokemon_name_generator/version.rb +1 -1
- data/lib/pokemon_name_generator.rb +1 -4
- metadata +26 -6
- data/lib/pokemon_name_generator/markov.rb +0 -64
- data/lib/pokemon_name_generator/naive.rb +0 -28
- data/lib/pokemon_name_generator/phoneme.rb +0 -7
- data/lib/pokemon_name_generator/pokemon.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9edb273da4cdabb9557232e24699f3f82e926676974c2ef1c81cce52b6e871cf
|
4
|
+
data.tar.gz: f4e6bef343c36aca003243b4b0cbfbc50ad1afeabdd9cf1e5e7ceba8f3a95209
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f404f12c3cb2d950e1e9c971bddf78e6aa428d1c2429859787661facdfe2da88b40688ea7c14740e79e07c051f23a3d234a5167252ee1384841e29be099b6268
|
7
|
+
data.tar.gz: 20fc66d841cda24aac7b971b676a2ceaaa9479ae63201d7a9fb2ea819b88408a98946d6d99bb66b521ec33316610906fe6690a1ac74e73705aaa681cac3c11de
|
data/README.md
CHANGED
@@ -1,44 +1,58 @@
|
|
1
1
|
# Pokémon Name Generator
|
2
2
|
|
3
|
+

|
4
|
+

|
5
|
+
[](https://badge.fury.io/rb/pokemon_name_generator)
|
6
|
+
|
3
7
|
A command line ruby utility to generate fake (and sometimes accidentally real)
|
4
8
|
Pokémon names.
|
5
9
|
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Install the utility with
|
13
|
+
|
14
|
+
```bash
|
15
|
+
$ gem install pokemon_name_generator
|
16
|
+
```
|
17
|
+
|
6
18
|
## Usage
|
7
19
|
|
20
|
+
Once installed, you will have the command `pokeng` available.
|
21
|
+
|
8
22
|
Usage can be very simple.
|
9
23
|
|
10
24
|
```bash
|
11
|
-
$
|
25
|
+
$ pokeng generate
|
12
26
|
```
|
13
27
|
|
14
28
|
You can choose between algorithms.
|
15
29
|
|
16
30
|
```bash
|
17
|
-
$
|
18
|
-
$
|
31
|
+
$ pokeng generate --algorithm=naive
|
32
|
+
$ pokeng generate --algorithm=markov
|
19
33
|
```
|
20
34
|
|
21
35
|
Some algorithms have additional configuration options.
|
22
36
|
|
23
37
|
```bash
|
24
|
-
$
|
38
|
+
$ pokeng generate --algorithm=markov --context=2
|
25
39
|
```
|
26
40
|
|
27
41
|
You can also produce a number of names at once.
|
28
42
|
Useful for exporting to other apps.
|
29
43
|
|
30
44
|
```bash
|
31
|
-
$
|
45
|
+
$ pokeng generate --algorithm=markov --context=3 --number=100000 --quiet > generated_names.txt
|
32
46
|
```
|
33
47
|
|
34
48
|
The default options are chosen to produce the most realistic names.
|
35
49
|
|
36
|
-
## Testing
|
50
|
+
## Testing an Algorithm
|
37
51
|
|
38
52
|
You can put an algorithm through a testbed to find out how well it performs.
|
39
53
|
It counts how many times an actual Pokémon name is produced (from the test and
|
40
54
|
training data seperately) and how often a overly long or short name is produced.
|
41
55
|
|
42
56
|
```bash
|
43
|
-
$
|
57
|
+
$ pokeng test --algorithm=markov --context=2 --number=500000
|
44
58
|
```
|