word encoder and decoder | ScratchStats