partial heavy refactoring of the word embedding package, learning is broken