Skip to content

Instantly share code, notes, and snippets.

View javallone's full-sized avatar

Jeff Avallone javallone

View GitHub Profile

Keybase proof

I hereby claim:

  • I am javallone on github.
  • I am javallone (https://keybase.io/javallone) on keybase.
  • I have a public key whose fingerprint is 2A06 2726 FA4B 431C 6426 C89C 10BA E604 13A2 D301

To claim this, I am signing this object:

@javallone
javallone / README.md
Created March 14, 2014 01:33
Generate random words

Generating weights

Before generating any words, you first need a weights file. Generate one using build_weights.rb like so:

cat /path/to/dictionary | ./build_weights.rb 5 > weights.json

This will generate the weights.json file based on the words in /path/to/dictionary with a look-back of 5. The input dictionary is a collection of words, one per line. The look-back controls how much context will be used when generating a word. A look-back of one tends to generate more gibberish words, higher values will create more coherent words. 5 seems to give very good results.