aboutsummaryrefslogtreecommitdiffhomepage
path: root/README.md
blob: 8e55a59c11eab2be56b2e2df593f366e315e2a89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Random word generator

Generates random pseudo-English words. It is mainly for naming your hobby projects in a moment.

It internally uses "Markov chain" to generate words. The chain model is built during the compile phase of the tool, referring to `words` file (`/usr/share/dict/words`). The built model is embedded to the executable.

## Usage

```
$ rand-word-gen
eendo
ddips
uphr
blinta
unto
ont
vedaro
dera
ekarrb
goice
sfodo
ainis
rier
fatem
myimd
grasic
honge
ustoge
ear
nal

# Sets a number of generated words.
$ rand-word-gen -n 5
piva
ors
glo
mapt
blclyp
```

See `rand-word-gen --help` for details.

## Build

```
$ cargo build --release
```

## TODO

* Pass a custom words file at runtime.
* Specify length of generated words.

## License

MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)