word embedding graph constructor