How can I create one hot encoding of words with each word represented by a sparse vector of vocab size and the index of that particular word equated to 1 , using tensorflow ?
something like
oneHotEncoding(words = ['a','b','c','d']) -> [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]] ?